volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

AI OnAI Off

Autocomplete Substring Match

Hi 

At the moment is only able to prefix match

Autocomplete typing

As per above

"The autocomplete functionality only works from the beginning of a phrase; the search term must begin with the first word in the autocomplete phrase."

var autoCompletePhrases = await Client.Statistics().AutocompleteAsync(queryterm, count);

Is there anyway to substring match

so if my auto complete term is "one two three"

The result is returned if I start with "one".

If I pass "two" it does not return anything.

Regards

 

#340439
Sep 17, 2025 12:36

Instead of using AutocompleteAsync, you can implement your own autocomplete logic using a standard search query with a wildcard or n-gram analyzer:

var results = searchClient
    .Search<YourContentType>()
    .Filter(x => x.SearchTitle.MatchWildcard($"*{queryTerm}*"))
    .Take(10)
    .GetResult();
#340869
Oct 30, 2025 6:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.