Class LuceneIndexMaintainer
java.lang.Object
com.apple.foundationdb.record.provider.foundationdb.IndexMaintainer
com.apple.foundationdb.record.provider.foundationdb.indexes.StandardIndexMaintainer
com.apple.foundationdb.record.lucene.LuceneIndexMaintainer
Index maintainer for Lucene Indexes backed by FDB. The insert, update, and delete functionality
coupled with the scan functionality is implemented here.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringstatic final Stringprotected static final StringFields inherited from class com.apple.foundationdb.record.provider.foundationdb.indexes.StandardIndexMaintainer
TOO_LARGE_VALUE_MESSAGE_LIMITFields inherited from class com.apple.foundationdb.record.provider.foundationdb.IndexMaintainer
state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddedRangeWithKey(Tuple primaryKey) booleancanDeleteWhere(QueryToKeyMatcher matcher, Key.Evaluated evaluated) booleanbooleancanEvaluateRecordFunction(IndexRecordFunction<?> function) protected FDBDirectoryManagerdeleteWhere(Transaction tr, Tuple prefix) evaluateAggregateFunction(IndexAggregateFunction function, TupleRange range, IsolationLevel isolationLevel) <T,M extends Message>
CompletableFuture<T>evaluateRecordFunction(EvaluationContext context, IndexRecordFunction<T> function, FDBRecord<M> record) protected FDBDirectorygetDirectory(Tuple groupingKey, Integer partitionId) boolean<M extends Message>
FDBIndexableRecord<M>maybeFilterRecord(FDBIndexableRecord<M> rec) voidmergeIndexForTesting(Tuple groupingKey, Integer partitionId, AgilityContext agilityContext) performOperation(IndexOperation operation) scan(IndexScanType scanType, TupleRange range, byte[] continuation, ScanProperties scanProperties) scan(IndexScanBounds scanBounds, byte[] continuation, ScanProperties scanProperties) The scan takes Lucene aQueryas scan bounds.<M extends Message>
CompletableFuture<Void>update(FDBIndexableRecord<M> oldRecord, FDBIndexableRecord<M> newRecord) validateEntries(byte[] continuation, ScanProperties scanProperties) Methods inherited from class com.apple.foundationdb.record.provider.foundationdb.indexes.StandardIndexMaintainer
addUniquenessViolation, canDeleteGroup, canDeleteWhere, checkKeyValueSizes, checkUniqueness, clearUniquenessViolations, commonKeys, decodeValue, evaluateIndex, filteredIndexEntries, getExecutor, getFilterTypeForRecord, getGroupedCount, getGroupingCount, getTimer, indexEntryKey, makeMutable, removeUniquenessViolationsAsync, saveIndexEntryAsKeyValue, scan, scanRemoteFetchByValue, scanUniquenessViolations, skipUpdateForUnchangedKeys, trimTooLargeTuple, unpackKeyValue, unpackKeyValue, unpackRemoteFetchRecord, updateIndexKeys, updateIndexKeysFunction, updateOneKeyAsync, updateWhileWriteOnly, validateMissingEntries, validateOrphanEntriesMethods inherited from class com.apple.foundationdb.record.provider.foundationdb.IndexMaintainer
getIndexSubspace, getSecondarySubspace, scanRemoteFetch, unsupportedAggregateFunction, unsupportedRecordFunction
-
Field Details
-
PRIMARY_KEY_FIELD_NAME
- See Also:
-
PRIMARY_KEY_SEARCH_NAME
- See Also:
-
PRIMARY_KEY_BINARY_POINT_NAME
- See Also:
-
-
Constructor Details
-
LuceneIndexMaintainer
-
-
Method Details
-
getAutoCompleteAnalyzerSelector
-
scan
@Nonnull public RecordCursor<IndexEntry> scan(@Nonnull IndexScanType scanType, @Nonnull TupleRange range, @Nullable byte[] continuation, @Nonnull ScanProperties scanProperties) - Specified by:
scanin classIndexMaintainer
-
scan
@Nonnull public RecordCursor<IndexEntry> scan(@Nonnull IndexScanBounds scanBounds, @Nullable byte[] continuation, @Nonnull ScanProperties scanProperties) The scan takes Lucene aQueryas scan bounds.- Overrides:
scanin classIndexMaintainer- Parameters:
scanBounds- thetypeof Lucene scan and associatedQuerycontinuation- any continuation from a previous scan invocationscanProperties- skip, limit and other properties of the scan- Returns:
- RecordCursor of index entries reconstituted from Lucene documents
-
mergeIndex
- Overrides:
mergeIndexin classStandardIndexMaintainer
-
mergeIndexForTesting
public void mergeIndexForTesting(@Nonnull Tuple groupingKey, @Nullable Integer partitionId, @Nonnull AgilityContext agilityContext) throws IOException - Throws:
IOException
-
getPartitioner
-
rebalancePartitions
-
update
@Nonnull public <M extends Message> CompletableFuture<Void> update(@Nullable FDBIndexableRecord<M> oldRecord, @Nullable FDBIndexableRecord<M> newRecord) - Overrides:
updatein classStandardIndexMaintainer
-
maybeFilterRecord
@Nullable public <M extends Message> FDBIndexableRecord<M> maybeFilterRecord(FDBIndexableRecord<M> rec) -
validateEntries
@Nonnull public RecordCursor<InvalidIndexEntry> validateEntries(@Nullable byte[] continuation, @Nullable ScanProperties scanProperties) - Overrides:
validateEntriesin classStandardIndexMaintainer
-
canEvaluateRecordFunction
- Overrides:
canEvaluateRecordFunctionin classStandardIndexMaintainer
-
evaluateRecordFunction
@Nonnull public <T,M extends Message> CompletableFuture<T> evaluateRecordFunction(@Nonnull EvaluationContext context, @Nonnull IndexRecordFunction<T> function, @Nonnull FDBRecord<M> record) - Overrides:
evaluateRecordFunctionin classStandardIndexMaintainer
-
canEvaluateAggregateFunction
- Overrides:
canEvaluateAggregateFunctionin classStandardIndexMaintainer
-
evaluateAggregateFunction
@Nonnull public CompletableFuture<Tuple> evaluateAggregateFunction(@Nonnull IndexAggregateFunction function, @Nonnull TupleRange range, @Nonnull IsolationLevel isolationLevel) - Overrides:
evaluateAggregateFunctionin classStandardIndexMaintainer
-
isIdempotent
public boolean isIdempotent()- Overrides:
isIdempotentin classStandardIndexMaintainer
-
addedRangeWithKey
- Overrides:
addedRangeWithKeyin classStandardIndexMaintainer
-
canDeleteWhere
- Overrides:
canDeleteWherein classStandardIndexMaintainer
-
deleteWhere
- Overrides:
deleteWherein classStandardIndexMaintainer
-
performOperation
@Nonnull public CompletableFuture<IndexOperationResult> performOperation(@Nonnull IndexOperation operation) - Overrides:
performOperationin classStandardIndexMaintainer
-
getDirectory
-
getDirectoryManager
-
createDirectoryManager
-
getIndexScrubbingTools
@Nullable public IndexScrubbingTools<?> getIndexScrubbingTools(IndexScrubbingTools.ScrubbingType type) - Overrides:
getIndexScrubbingToolsin classIndexMaintainer
-