fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

Phrase auto-completion with leading stop words does not find expected match

Open qdnguyen0 opened this issue 1 year ago • 0 comments

“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);
        }```

qdnguyen0 avatar Jan 19 '24 05:01 qdnguyen0