I'm using Elasticsearch in my .NET app and i construct a query like this:
POST xxx/_search?typed_keys=true
{
"query": {
"bool": {
"must": [
{
"query_string": {
"fields": [
"FirstName",
"LastName"
],
"query": "/محمد(.*?)/ AND /محمد(ی|ي|ئ)(.*?)/"
}
}
]
}
},
"size": 30,
"sort": [
{
"_score": {
"order": "desc"
}
}
]
}
it seems elastic can not give the correct data with this format that I'm making
now i want to know what is the problem with this part of a query:
"query": "/محمد(.?)/ AND /محمد(ی|ي|ئ)(.?)/"
for brief elastic will return me data but not really relevant to what I'm searching for