Class TermsQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.search.MultiTermQuery
-
- com.atlassian.confluence.impl.search.v2.lucene.TermsQuery
-
- All Implemented Interfaces:
Cloneable
public class TermsQuery extends org.apache.lucene.search.MultiTermQuery
A copy fromorg.apache.lucene.search.join.JoinUtil.TermsQuery
. Note that the defaultrewrite
method ofMultiTermQuery
doesn't calculate score which means it acts merely as a filter.- Since:
- 7.17
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.lucene.search.MultiTermQuery
org.apache.lucene.search.MultiTermQuery.ConstantScoreAutoRewrite, org.apache.lucene.search.MultiTermQuery.RewriteMethod, org.apache.lucene.search.MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite, org.apache.lucene.search.MultiTermQuery.TopTermsScoringBooleanQueryRewrite
-
-
Constructor Summary
Constructors Constructor Description TermsQuery(String field, Collection<String> terms)
TermsQuery(String field, org.apache.lucene.util.BytesRefHash terms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
protected org.apache.lucene.index.TermsEnum
getTermsEnum(org.apache.lucene.index.Terms terms, org.apache.lucene.util.AttributeSource atts)
int
hashCode()
String
toString(String string)
-
Methods inherited from class org.apache.lucene.search.MultiTermQuery
getField, getRewriteMethod, getTermsEnum, rewrite, setRewriteMethod
-
-
-
-
Constructor Detail
-
TermsQuery
public TermsQuery(String field, org.apache.lucene.util.BytesRefHash terms)
- Parameters:
field
- The field that should contain terms that are specified in the previous parameterterms
- The terms that matching documents should have. The terms must be sorted by natural order.
-
TermsQuery
public TermsQuery(String field, Collection<String> terms)
-
-
Method Detail
-
getTermsEnum
protected org.apache.lucene.index.TermsEnum getTermsEnum(org.apache.lucene.index.Terms terms, org.apache.lucene.util.AttributeSource atts) throws IOException
- Specified by:
getTermsEnum
in classorg.apache.lucene.search.MultiTermQuery
- Throws:
IOException
-
toString
public String toString(String string)
- Specified by:
toString
in classorg.apache.lucene.search.Query
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classorg.apache.lucene.search.MultiTermQuery
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classorg.apache.lucene.search.MultiTermQuery
-
-