org.elasticsearch.common.lucene.search
Class MultiPhrasePrefixQuery

java.lang.Object
  extended by org.apache.lucene.search.Query
      extended by org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery
All Implemented Interfaces:
Serializable, Cloneable

public class MultiPhrasePrefixQuery
extends org.apache.lucene.search.Query

See Also:
Serialized Form

Constructor Summary
MultiPhrasePrefixQuery()
           
 
Method Summary
 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.
 int[] getPositions()
          Returns the relative positions of terms in this phrase.
 int getSlop()
          Sets the phrase slop for this query.
 List<org.apache.lucene.index.Term[]> getTermArrays()
          Returns a List of the terms in the multiphrase.
 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)
           
 
Methods inherited from class org.apache.lucene.search.Query
clone, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiPhrasePrefixQuery

public MultiPhrasePrefixQuery()
Method Detail

setSlop

public void setSlop(int s)
Sets the phrase slop for this query.

See Also:
PhraseQuery.setSlop(int)

setMaxExpansions

public void setMaxExpansions(int maxExpansions)

getSlop

public int getSlop()
Sets the phrase slop for this query.

See Also:
PhraseQuery.getSlop()

add

public void add(org.apache.lucene.index.Term term)
Add a single term at the next position in the phrase.

See Also:
PhraseQuery.add(Term)

add

public void add(org.apache.lucene.index.Term[] terms)
Add multiple terms at the next position in the phrase. Any of the terms may match.

See Also:
PhraseQuery.add(Term)

add

public void add(org.apache.lucene.index.Term[] terms,
                int position)
Allows to specify the relative position of terms within the phrase.

Parameters:
terms -
position -
See Also:
PhraseQuery.add(Term, int)

getTermArrays

public List<org.apache.lucene.index.Term[]> getTermArrays()
Returns a List of the terms in the multiphrase. Do not modify the List or its contents.


getPositions

public int[] getPositions()
Returns the relative positions of terms in this phrase.


rewrite

public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
                                       throws IOException
Overrides:
rewrite in class org.apache.lucene.search.Query
Throws:
IOException

toString

public final String toString(String f)
Specified by:
toString in class org.apache.lucene.search.Query

equals

public boolean equals(Object o)
Returns true if o is equal to this.

Overrides:
equals in class org.apache.lucene.search.Query

hashCode

public int hashCode()
Returns a hash code value for this object.

Overrides:
hashCode in class org.apache.lucene.search.Query


Copyright © 2009-2012. All Rights Reserved.