public class MultiPhrasePrefixQuery
extends org.apache.lucene.search.Query
| Constructor and Description |
|---|
MultiPhrasePrefixQuery() |
| Modifier and Type | Method and 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(Object o)
Returns true if
o is equal to this. |
String |
getField() |
int[] |
getPositions()
Returns the relative positions of terms in this phrase.
|
int |
getSlop()
Sets the phrase slop for this query.
|
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.
|
String |
toString(String f) |
public void setSlop(int s)
PhraseQuery.setSlop(int)public void setMaxExpansions(int maxExpansions)
public int getSlop()
PhraseQuery.getSlop()public void add(org.apache.lucene.index.Term term)
PhraseQuery.add(Term)public void add(org.apache.lucene.index.Term[] terms)
PhraseQuery.add(Term)public void add(org.apache.lucene.index.Term[] terms,
int position)
terms - the termsposition - the position of the terms provided as argumentPhraseQuery.add(Term, int)public int[] getPositions()
public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
throws IOException
rewrite in class org.apache.lucene.search.QueryIOExceptionpublic final String toString(String f)
toString in class org.apache.lucene.search.Querypublic boolean equals(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 String getField()
Copyright © 2009–2017. All rights reserved.