Class LuceneIndexMaintainerHelper
java.lang.Object
com.apple.foundationdb.record.lucene.LuceneIndexMaintainerHelper
-
Method Summary
Modifier and TypeMethodDescriptionstatic intdeleteDocument(FDBRecordContext context, FDBDirectoryManager directoryManager, Index index, Tuple groupingKey, Integer partitionId, Tuple primaryKey, boolean isWriteOnlyMode) static voiddeleteDocument(org.apache.lucene.index.IndexWriter indexWriter, Tuple primaryKey, Index index) Delete a document in the index writer.static voidinsertField(LuceneDocumentFromRecord.DocumentField field, org.apache.lucene.document.Document document) Insert a field into the document and add a suggestion into the suggester if needed.static voidwriteDocument(FDBRecordContext context, org.apache.lucene.index.IndexWriter newWriter, Index index, Tuple primaryKey, List<LuceneDocumentFromRecord.DocumentField> fields)
-
Method Details
-
deleteDocument
public static int deleteDocument(FDBRecordContext context, FDBDirectoryManager directoryManager, Index index, Tuple groupingKey, Integer partitionId, Tuple primaryKey, boolean isWriteOnlyMode) throws IOException - Throws:
IOException
-
deleteDocument
public static void deleteDocument(org.apache.lucene.index.IndexWriter indexWriter, Tuple primaryKey, Index index) throws IOException Delete a document in the index writer.- Parameters:
indexWriter- the index writer to useprimaryKey- the document to deleteindex- the index used (for options)- Throws:
IOException- in case of error
-
writeDocument
public static void writeDocument(FDBRecordContext context, org.apache.lucene.index.IndexWriter newWriter, Index index, Tuple primaryKey, List<LuceneDocumentFromRecord.DocumentField> fields) throws IOException - Throws:
IOException
-
insertField
public static void insertField(LuceneDocumentFromRecord.DocumentField field, org.apache.lucene.document.Document document) Insert a field into the document and add a suggestion into the suggester if needed.
-