Class LuceneIndexKeyValueToPartialRecordUtils
java.lang.Object
com.apple.foundationdb.record.lucene.LuceneIndexKeyValueToPartialRecordUtils
A utility class to build a partial record for an auto-complete suggestion value, with grouping keys if there exist.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe copier to populate the lucene auto complete suggestion as a value for the field where it is indexed from. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildPartialRecord(KeyExpression root, Descriptors.Descriptor descriptor, Message.Builder builder, String luceneField, String suggestion) static voidbuildPartialRecord(KeyExpression root, Descriptors.Descriptor descriptor, Message.Builder builder, String luceneField, String suggestion, Tuple groupingKey) static IndexKeyValueToPartialRecordgetToPartialRecord(Index index, RecordType recordType, IndexScanType scanType) Get theIndexKeyValueToPartialRecordinstance for anIndexEntryrepresenting a result of Lucene auto-complete suggestion.static voidpopulatePrimaryKey(KeyExpression primaryKey, Descriptors.Descriptor descriptor, Message.Builder builder, Tuple tuple)
-
Method Details
-
buildPartialRecord
public static void buildPartialRecord(@Nonnull KeyExpression root, @Nonnull Descriptors.Descriptor descriptor, @Nonnull Message.Builder builder, @Nonnull String luceneField, @Nonnull String suggestion) -
buildPartialRecord
public static void buildPartialRecord(@Nonnull KeyExpression root, @Nonnull Descriptors.Descriptor descriptor, @Nonnull Message.Builder builder, @Nonnull String luceneField, @Nonnull String suggestion, @Nonnull Tuple groupingKey) -
populatePrimaryKey
public static void populatePrimaryKey(@Nonnull KeyExpression primaryKey, @Nonnull Descriptors.Descriptor descriptor, @Nonnull Message.Builder builder, @Nonnull Tuple tuple) -
getToPartialRecord
@Nonnull public static IndexKeyValueToPartialRecord getToPartialRecord(@Nonnull Index index, @Nonnull RecordType recordType, @Nonnull IndexScanType scanType) Get theIndexKeyValueToPartialRecordinstance for anIndexEntryrepresenting a result of Lucene auto-complete suggestion. The partial record contains the suggestion in the field where it is indexed from, and the grouping keys if there are any.- Parameters:
index- the index being scannedrecordType- the record type for indexed recordsscanType- the type of scan- Returns:
- a partial record generator
-