Class MultiPhrasePrefixQuery

  • All Implemented Interfaces:
    Cloneable


    public class MultiPhrasePrefixQuery
    extends org.apache.lucene.search.Query
    • Method Summary

      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.
      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, createWeight, extractTerms, getBoost, setBoost, toString
    • 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
      • equals

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

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

        public String getField()