fdb-record-layer
fdb-record-layer copied to clipboard
Phrase auto-completion with leading stop words does not find expected match
“of Ameri” does not match a completion against “United states of America”
Reproducing test:
void autoCompletePhraseSearchWithLeadingStopWords() throws Exception {
try (FDBRecordContext context = openContext()) {
final Index index = SIMPLE_TEXT_WITH_AUTO_COMPLETE;
final List<KeyExpression> storedFields = ImmutableList.of(SIMPLE_TEXT_WITH_AUTO_COMPLETE_STORED_FIELD);
addIndexAndSaveRecordsForAutoCompleteOfPhrase(context, index);
queryAndAssertAutoCompleteSuggestionsReturned(index,
storedFields,
"text",
"\"of ameri\"",
ImmutableList.of("united states of america",
"welcome to the united states of america",
"united states is a country in the continent of america"));
queryAndAssertAutoCompleteSuggestionsReturned(index,
storedFields,
"text",
"\"and of ameri\"",
ImmutableList.of("united states of america",
"welcome to the united states of america",
"united states is a country in the continent of america"));
commit(context);
}```