Types of dimension search
- Default dimension search
- Compound dimension search
What is compound dimension search ?
Compound dimension search enables MDEX engine to return combinations of dimension values, i.e. dimension states, that match a search query.
This search reduces to a default dimension search for single-term searches i.e. it is only relevant for multi-term searches.Compound dimension search results must satisfy following
- Validity – Must have records
- Coverage – Each dimension value MUST match at least 1 record
- Minimalism – Removing one should remove results.
By default all dimensions are enabled for dimension search.
Use thisDgidx flag to enable dimensions for compound dimension search.
Use ENEQuery.setDimSearchCompound() to enable compound dimension search on a search request.
Dimension values within a dimension are ordered based on
- Static dimension value ranks, OR
- Relevance ranking
Ordering of compound dimension search results is based upon
- No of dimensions within each result set
- Secondary sort which is lexicographical
- Values are sorted as per the static value ranks or relevancy ranking.
By default, dimension search returns dimensions with no records. To avoid this, use one of the below:
- Dn=0 (Query param)
This query param can be used to limit default dimension search to a single dimension.
This query param can be used to return all possible dimension values across all dimensions.
When numresults is used in conjunction with Drc, it limits the number of dimension values to return.
o for Offset. Use for paginating through Dimension search results.
Ranking for dimension values. Dk=0 or Dk=1. Not applicable to compound dimension search.Dn
Dimension search scope parameter. This searches within the results for dimension search.
Accessing dimension search results
Enable Refinement counts for dimension search
This is done on a per query basis. Use showcounts with Drc query parameter.
Retrieving refinement counts
Inside PropertyMap on DimVal object, the value is stored against key ‘Dgraph.Bins’ (or ‘Dgraph.AggrBins’).
Performance impact of refinement count
Adding refinement count for dimension search adds an overhead, especially for rapidly executing typeahead searches. Be careful.