My search term has reserved characters, and I need to perform a wildcard search

Hi,

I'm trying to search for multiple terms containing special characters using wildcards. To do this, I've employed the query string with the AND operator and multiple terms.

When I exclusively use the code below, wildcards (*) and the AND operator function correctly, but the search for special characters doesn't work:

.DefaultOperator(Operator.And)
.AnalyzeWildcard(true)
.Query(string.Join(" ", finalkeyword.Select(Key => $"*{Key}*")))

Conversely, when I only use the code below using the escape, the search for special characters functions properly, but wildcards (*) and the AND operator do not work:

.DefaultOperator(Operator.And) 
.Escape(true) 
.Query(string.Join(" ", finalkeyword.Select(Key => $"*{Key}*")))

My requirement was to use either multiple search terms or a single term. I wanted to employ the 'AND' operator along with a special character to conduct a wildcard search.

For Example search term :
"International" - Expected multiple results
" International doctor" - Expected multiple results
" International doctor day"- Expected multiple results
"International doctor day 05/30/2023" - Expected 1 results
"05/30/2023" - Expected multiple results
"Internat doct da 05/30/2023" - Expected multiple results

Hi,

I would appreciate any suggestions and assistance you may provide.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.