Multi matching wildcard text

I have to apply search on two fields, and I have a wildcard text to search. if the text is found in either of the fields that should result in a hit. I am using Olivere golang package. I tried a combination of should and wildcard query but it is not showing the desired result.
Any help with a code syntax is much appreciated.

can you share your query ? where in kibana are you trying to use this ?
in discover for example (or other places with searchbar) i can just enter my kql query like this (using ecommerce sample data):
category : men* or currency : E*

boolQuery := elastic.NewBoolQuery()
boolQuery = boolQuery.Should(elastic.NewWildcardQuery(email , "*"+text+"*"))
boolQuery = boolQuery.Should(elastic.NewWildcardQuery(name, "*"+text+"*"))

this is the query, then i am searching an index

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