Class CustomTermFreqField

java.lang.Object
org.apache.lucene.document.Field
org.elasticsearch.index.mapper.CustomTermFreqField
All Implemented Interfaces:
org.apache.lucene.index.IndexableField

public final class CustomTermFreqField extends org.apache.lucene.document.Field
Custom field that allows storing an integer value as a term frequency in lucene.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.lucene.document.Field

    org.apache.lucene.document.Field.Store
  • Field Summary

    Fields inherited from class org.apache.lucene.document.Field

    fieldsData, name, tokenStream, type
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomTermFreqField(String fieldName, CharSequence term, int fieldValue)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setFieldValue(int fieldValue)
     
    org.apache.lucene.analysis.TokenStream
    tokenStream(org.apache.lucene.analysis.Analyzer analyzer, org.apache.lucene.analysis.TokenStream reuse)
     

    Methods inherited from class org.apache.lucene.document.Field

    binaryValue, fieldType, getCharSequenceValue, name, numericValue, readerValue, setBytesValue, setBytesValue, setByteValue, setDoubleValue, setFloatValue, setIntValue, setLongValue, setReaderValue, setShortValue, setStringValue, setTokenStream, stringValue, tokenStreamValue, toString

    Methods inherited from class java.lang.Object

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

    • CustomTermFreqField

      public CustomTermFreqField(String fieldName, CharSequence term, int fieldValue)
  • Method Details

    • setFieldValue

      public void setFieldValue(int fieldValue)
    • tokenStream

      public org.apache.lucene.analysis.TokenStream tokenStream(org.apache.lucene.analysis.Analyzer analyzer, org.apache.lucene.analysis.TokenStream reuse)
      Specified by:
      tokenStream in interface org.apache.lucene.index.IndexableField
      Overrides:
      tokenStream in class org.apache.lucene.document.Field