public class MultiPhrasePrefixQuery
extends org.apache.lucene.search.Query
| Constructor | Description |
|---|---|
MultiPhrasePrefixQuery() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(org.apache.lucene.index.Term term) |
Add a single term at the next position in the phrase.
|
void |
add(org.apache.lucene.index.Term[] terms) |
Add multiple terms at the next position in the phrase.
|
void |
add(org.apache.lucene.index.Term[] terms,
int position) |
Allows to specify the relative position of terms within the phrase.
|
boolean |
equals(java.lang.Object o) |
Returns true if
o is equal to this. |
java.lang.String |
getField() |
|
int[] |
getPositions() |
Returns the relative positions of terms in this phrase.
|
int |
getSlop() |
Sets the phrase slop for this query.
|
org.apache.lucene.index.Term[][] |
getTerms() |
Returns the terms for each position in this phrase
|
int |
hashCode() |
Returns a hash code value for this object.
|
org.apache.lucene.search.Query |
rewrite(org.apache.lucene.index.IndexReader reader) |
|
void |
setMaxExpansions(int maxExpansions) |
|
void |
setSlop(int s) |
Sets the phrase slop for this query.
|
java.lang.String |
toString(java.lang.String f) |
public void setSlop(int s)
PhraseQuery.Builder.setSlop(int)public void setMaxExpansions(int maxExpansions)
public int getSlop()
PhraseQuery.getSlop()public void add(org.apache.lucene.index.Term term)
PhraseQuery.Builder.add(Term)public void add(org.apache.lucene.index.Term[] terms)
PhraseQuery.Builder.add(Term)public void add(org.apache.lucene.index.Term[] terms,
int position)
terms - the termsposition - the position of the terms provided as argumentPhraseQuery.Builder.add(Term, int)public org.apache.lucene.index.Term[][] getTerms()
public int[] getPositions()
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
throws java.io.IOException
rewrite in class org.apache.lucene.search.Queryjava.io.IOExceptionpublic final java.lang.String toString(java.lang.String f)
toString in class org.apache.lucene.search.Querypublic boolean equals(java.lang.Object o)
o is equal to this.equals in class org.apache.lucene.search.Querypublic int hashCode()
hashCode in class org.apache.lucene.search.Querypublic java.lang.String getField()