public final class DrillDown extends Object
CategoryPath. This can be used to e.g. narrow down a user's search to selected categories.
NOTE: if you choose to create your own
Query by calling
term(org.apache.lucene.facet.search.params.FacetSearchParams, org.apache.lucene.facet.taxonomy.CategoryPath), it is recommended to wrap it with
and set the
so that it does not affect the scores of the documents.
|Constructor and Description|
|Modifier and Type||Method and Description|
Wraps a given
Return a drill-down
public static final Term term(FacetSearchParams sParams, CategoryPath path)
public static final Term term(FacetIndexingParams iParams, CategoryPath path)
Termfor a category.
public static final Query query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths)
Queryas a drill-down query over the given categories, assuming all are required (e.g.
AND). You can construct a query with different modes (such as
ORs) by creating a
BooleanQueryand call this method several times. Make sure to wrap the query in that case by
ConstantScoreQueryand set the boost to 0.0f, so that it doesn't affect scoring.
baseQuery can be
null, in which case only the
Query over the categories will is returned.
public static final Query query(FacetSearchParams sParams, Query baseQuery, CategoryPath... paths)
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.