Hello,
I am using Elasticsearch version "5.3.2".
I am trying to write a query that will match exact text/string.
The query looks like this:
{
query: {
bool: {
must: {
match: {
userEmail: "abc@xyz.com"
}
},
filter: {
term: { questionText: searchText }
}
}
},
size: limit,
from: skip,
}
searchText could be
- 5
- 5*2
- 10/5
- How are you?
When I am passing 5 or 2 or 10 or how as the searchText it is working fine and I am getting desired output.
But whenever I am passing 5*2 or how are as the searchText I am not getting any result.
Is this possible to use term query for exact matching of a string containing a special character or white space?