org.apache.lucene.search
public class MultiPhraseQuery extends Query
(Term[]).
To use this class, to search for the phrase "Microsoft app*" first use
add(Term) on the term "Microsoft", then find all terms that have "app" as
prefix using IndexReader.terms(Term), and use MultiPhraseQuery.add(Term[]
terms) to add them to the query.
Version: 1.0
| Method Summary | |
|---|---|
| void | add(Term term) Add a single term at the next position in the phrase. |
| void | add(Term[] terms) Add multiple terms at the next position in the phrase. |
| void | add(Term[] terms, int position)
Allows to specify the relative position of terms within the phrase.
|
| protected Weight | createWeight(Searcher searcher) |
| boolean | equals(Object o) Returns true if o is equal to this. |
| void | extractTerms(Set terms) |
| int[] | getPositions()
Returns the relative positions of terms in this phrase. |
| int | getSlop() Sets the phrase slop for this query. |
| List | getTermArrays()
Returns a List |
| int | hashCode() Returns a hash code value for this object. |
| Query | rewrite(IndexReader reader) |
| void | setSlop(int s) Sets the phrase slop for this query. |
| String | toString(String f) Prints a user-readable version of this query. |
See Also: add
See Also: add
Parameters: terms position
See Also: PhraseQuery
o is equal to this.See Also: getSlop
See Also: PhraseQuery