Class LuceneModernIdReaderWriter
- java.lang.Object
-
- org.hibernate.search.backend.lucene.document.impl.LuceneModernIdReaderWriter
-
- All Implemented Interfaces:
LuceneIdReader,LuceneIdReaderWriter,LuceneIdWriter
public final class LuceneModernIdReaderWriter extends Object implements LuceneIdReaderWriter
-
-
Field Summary
Fields Modifier and Type Field Description static LuceneIdReaderWriterINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.lucene.index.BinaryDocValuesidDocValues(org.apache.lucene.index.LeafReader reader)Creates aBinaryDocValuesbacked up by a specific field depending on a configured ID read/write strategy.voidwrite(String id, org.apache.lucene.document.Document document)Writes an ID to the document.
-
-
-
Field Detail
-
INSTANCE
public static final LuceneIdReaderWriter INSTANCE
-
-
Method Detail
-
idDocValues
public org.apache.lucene.index.BinaryDocValues idDocValues(org.apache.lucene.index.LeafReader reader) throws IOExceptionDescription copied from interface:LuceneIdReaderCreates aBinaryDocValuesbacked up by a specific field depending on a configured ID read/write strategy.- Specified by:
idDocValuesin interfaceLuceneIdReader- Parameters:
reader- The reader to retrieve IDs from.- Returns:
- Returns
BinaryDocValuesfor the ID field. - Throws:
IOException- On I/O error occurred while creating doc values.- See Also:
LuceneBackendSettings.SCHEMA_ID_STRATEGY
-
write
public void write(String id, org.apache.lucene.document.Document document)
Description copied from interface:LuceneIdWriterWrites an ID to the document. Implementations chose which filed name to use and how many fields are used to represent the ID.- Specified by:
writein interfaceLuceneIdWriter- Parameters:
id- The id to add to the document.document- The document to write to.- See Also:
LuceneBackendSettings.SCHEMA_ID_STRATEGY
-
-