public final class DrillDown extends Object
queries
or terms
over 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 ConstantScoreQuery
and set the boost
to 0.0f
,
so that it does not affect the scores of the documents.
Constructor and Description |
---|
DrillDown() |
Modifier and Type | Method and Description |
---|---|
static Query |
query(FacetIndexingParams iParams,
Query baseQuery,
CategoryPath... paths)
Wraps a given
Query as a drill-down query over the given
categories, assuming all are required (e.g. |
static Query |
query(FacetSearchParams sParams,
Query baseQuery,
CategoryPath... paths) |
static Term |
term(FacetIndexingParams iParams,
CategoryPath path)
Return a drill-down
Term for a category. |
static Term |
term(FacetSearchParams sParams,
CategoryPath path) |
public static final Term term(FacetSearchParams sParams, CategoryPath path)
public static final Term term(FacetIndexingParams iParams, CategoryPath path)
Term
for a category.public static final Query query(FacetIndexingParams iParams, Query baseQuery, CategoryPath... paths)
Query
as 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 OR
or AND
of
ORs
) by creating a BooleanQuery
and call this method
several times. Make sure to wrap the query in that case by
ConstantScoreQuery
and set the boost to 0.0f, so that it doesn't
affect scoring.
NOTE: 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.