Try our conversational search powered by Generative AI!

Wildcard search and Synonyms

Vote:
 

Is it possible to use wildcard search and synonyms in the same query?

            var data = SearchClient.Instance.UnifiedSearch(SearchLanguageHelper.Get(request.Language))
                .For(request.Query, q =>
                {
                    q.Query = string.Format("*{0}*", request.Query);
                })
                .UsingSynonyms()
                .GetResult();
#142066
Nov 30, 2015 9:56
Vote:
 

I used 'Multiple search' functionality to resolve this issue

	var data = SearchClient.Instance.MultiUnifiedSearch()
                .UnifiedSearch(s => s.For(request.Query, q => { q.Query = string.Format("*{0}*", request.Query); }))
                .UnifiedSearch(s => s.For(request.Query).UsingSynonyms())
                .GetResult();

Maybe someone has a more beatiful solution?

#142094
Edited, Nov 30, 2015 19:46
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.