Class SimpleTermCountEnum

java.lang.Object
org.apache.lucene.index.TermsEnum
org.elasticsearch.xpack.core.termsenum.action.SimpleTermCountEnum
All Implemented Interfaces:
org.apache.lucene.util.BytesRefIterator

public class SimpleTermCountEnum extends org.apache.lucene.index.TermsEnum
A utility class for fields that need to support autocomplete via MappedFieldType.getTerms(IndexReader, String, boolean, String) but can't return a raw Lucene TermsEnum.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.index.TermsEnum

    org.apache.lucene.index.TermsEnum.SeekStatus
  • Field Summary

    Fields inherited from class org.apache.lucene.index.TermsEnum

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.lucene.util.AttributeSource
     
    int
     
    org.apache.lucene.index.ImpactsEnum
    impacts(int flags)
     
    org.apache.lucene.util.BytesRef
     
    long
    ord()
     
    org.apache.lucene.index.PostingsEnum
    postings(org.apache.lucene.index.PostingsEnum reuse, int flags)
     
    org.apache.lucene.util.IOBooleanSupplier
    prepareSeekExact(org.apache.lucene.util.BytesRef bytesRef)
     
    org.apache.lucene.index.TermsEnum.SeekStatus
    seekCeil(org.apache.lucene.util.BytesRef text)
     
    void
    seekExact(long ord)
     
    boolean
    seekExact(org.apache.lucene.util.BytesRef text)
     
    void
    seekExact(org.apache.lucene.util.BytesRef term, org.apache.lucene.index.TermState state)
     
    org.apache.lucene.util.BytesRef
     
    org.apache.lucene.index.TermState
     
    long
     

    Methods inherited from class org.apache.lucene.index.TermsEnum

    postings

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SimpleTermCountEnum

      public SimpleTermCountEnum(String[] terms)
    • SimpleTermCountEnum

      public SimpleTermCountEnum(String termCount)
  • Method Details

    • term

      public org.apache.lucene.util.BytesRef term() throws IOException
      Specified by:
      term in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • next

      public org.apache.lucene.util.BytesRef next() throws IOException
      Throws:
      IOException
    • docFreq

      public int docFreq() throws IOException
      Specified by:
      docFreq in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • attributes

      public org.apache.lucene.util.AttributeSource attributes()
      Specified by:
      attributes in class org.apache.lucene.index.TermsEnum
    • prepareSeekExact

      public org.apache.lucene.util.IOBooleanSupplier prepareSeekExact(org.apache.lucene.util.BytesRef bytesRef) throws IOException
      Specified by:
      prepareSeekExact in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • seekExact

      public boolean seekExact(org.apache.lucene.util.BytesRef text) throws IOException
      Specified by:
      seekExact in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • seekCeil

      public org.apache.lucene.index.TermsEnum.SeekStatus seekCeil(org.apache.lucene.util.BytesRef text) throws IOException
      Specified by:
      seekCeil in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • seekExact

      public void seekExact(long ord) throws IOException
      Specified by:
      seekExact in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • seekExact

      public void seekExact(org.apache.lucene.util.BytesRef term, org.apache.lucene.index.TermState state) throws IOException
      Specified by:
      seekExact in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • ord

      public long ord() throws IOException
      Specified by:
      ord in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • totalTermFreq

      public long totalTermFreq() throws IOException
      Specified by:
      totalTermFreq in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • postings

      public org.apache.lucene.index.PostingsEnum postings(org.apache.lucene.index.PostingsEnum reuse, int flags) throws IOException
      Specified by:
      postings in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • impacts

      public org.apache.lucene.index.ImpactsEnum impacts(int flags) throws IOException
      Specified by:
      impacts in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException
    • termState

      public org.apache.lucene.index.TermState termState() throws IOException
      Specified by:
      termState in class org.apache.lucene.index.TermsEnum
      Throws:
      IOException