Class AbstractLuceneNumericFieldCodec<F,E extends Number>
java.lang.Object
org.hibernate.search.backend.lucene.types.codec.impl.AbstractLuceneNumericFieldCodec<F,E>
- All Implemented Interfaces:
LuceneFieldCodec<F,E>
- Direct Known Subclasses:
LuceneBigDecimalFieldCodec,LuceneBigIntegerFieldCodec,LuceneBooleanFieldCodec,LuceneByteFieldCodec,LuceneDoubleFieldCodec,LuceneFloatFieldCodec,LuceneInstantFieldCodec,LuceneIntegerFieldCodec,LuceneLocalDateFieldCodec,LuceneLocalDateTimeFieldCodec,LuceneLocalTimeFieldCodec,LuceneLongFieldCodec,LuceneMonthDayFieldCodec,LuceneOffsetDateTimeFieldCodec,LuceneOffsetTimeFieldCodec,LuceneShortFieldCodec,LuceneYearFieldCodec,LuceneYearMonthFieldCodec,LuceneZonedDateTimeFieldCodec
public abstract class AbstractLuceneNumericFieldCodec<F,E extends Number>
extends Object
implements LuceneFieldCodec<F,E>
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLuceneNumericFieldCodec(Indexing indexing, DocValues docValues, Storage storage, F indexNullAsValue) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddToDocument(LuceneDocumentContent documentBuilder, String absoluteFieldPath, F value) Encode the given value in the document by adding new fields to the Lucene document.abstract LuceneNumericDomain<E>booleanisCompatibleWith(LuceneFieldCodec<?, ?> obj) Determine whether the given codec provides an encoding that is compatible with this codec, i.e. whether itsLuceneFieldCodec.decode(IndexableField)andLuceneFieldCodec.encode(Object)methods behave the same way.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.search.backend.lucene.types.codec.impl.LuceneFieldCodec
decode, decode, encode, encodedType, raw
-
Constructor Details
-
AbstractLuceneNumericFieldCodec
-
-
Method Details
-
addToDocument
public final void addToDocument(LuceneDocumentContent documentBuilder, String absoluteFieldPath, F value) Description copied from interface:LuceneFieldCodecEncode the given value in the document by adding new fields to the Lucene document.- Specified by:
addToDocumentin interfaceLuceneFieldCodec<F,E extends Number> - Parameters:
documentBuilder- The document builder.absoluteFieldPath- The absolute path of the field.value- The value to encode.
-
isCompatibleWith
Description copied from interface:LuceneFieldCodecDetermine whether the given codec provides an encoding that is compatible with this codec, i.e. whether itsLuceneFieldCodec.decode(IndexableField)andLuceneFieldCodec.encode(Object)methods behave the same way.NOTE:
LuceneFieldCodec.addToDocument(LuceneDocumentContent, String, Object)may behave differently, e.g. it may add docvalues while this codec does not. The behavior ofLuceneFieldCodec.addToDocument(LuceneDocumentContent, String, Object)is considered irrelevant when checking the equivalence of encoding, because such differences should be accounted for through other ways (fields being assigned incompatible predicate factories, etc.).- Specified by:
isCompatibleWithin interfaceLuceneFieldCodec<F,E extends Number> - Parameters:
obj- AnotherLuceneFieldCodec, nevernull.- Returns:
trueif the given codec is compatible.falseotherwise, or when in doubt.
-
getDomain
-