|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.Query org.apache.lucene.facet.search.DrillDownQuery
public final class DrillDownQuery
A Query
for drill-down over categories
. You
should call add(CategoryPath...)
for every group of categories you
want to drill-down over. Each category in the group is OR'ed
with
the others, and groups are AND'ed
.
NOTE: if you choose to create your own Query
by calling
term(org.apache.lucene.facet.params.FacetIndexingParams, 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 Summary | |
---|---|
DrillDownQuery(FacetIndexingParams fip)
Creates a new DrillDownQuery without a base query,
to perform a pure browsing query (equivalent to using
MatchAllDocsQuery as base). |
|
DrillDownQuery(FacetIndexingParams fip,
Query baseQuery)
Creates a new DrillDownQuery over the given base query. |
Method Summary | |
---|---|
void |
add(CategoryPath... paths)
Adds one dimension of drill downs; if you pass multiple values they are OR'd, and then the entire dimension is AND'd against the base query. |
DrillDownQuery |
clone()
|
boolean |
equals(Object obj)
|
int |
hashCode()
|
Query |
rewrite(IndexReader r)
|
static Term |
term(FacetIndexingParams iParams,
CategoryPath path)
Return a drill-down Term for a category. |
String |
toString(String field)
|
Methods inherited from class org.apache.lucene.search.Query |
---|
createWeight, extractTerms, getBoost, setBoost, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DrillDownQuery(FacetIndexingParams fip)
DrillDownQuery
without a base query,
to perform a pure browsing query (equivalent to using
MatchAllDocsQuery
as base).
public DrillDownQuery(FacetIndexingParams fip, Query baseQuery)
DrillDownQuery
over the given base query. Can be
null
, in which case the result Query
from
rewrite(IndexReader)
will be a pure browsing query, filtering on
the added categories only.
Method Detail |
---|
public static Term term(FacetIndexingParams iParams, CategoryPath path)
Term
for a category.
public void add(CategoryPath... paths)
public DrillDownQuery clone()
clone
in class Query
public int hashCode()
hashCode
in class Query
public boolean equals(Object obj)
equals
in class Query
public Query rewrite(IndexReader r) throws IOException
rewrite
in class Query
IOException
public String toString(String field)
toString
in class Query
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |