Elasticsearch range query

Hi All,

I have a problem while searching records using range query in the below format,
{
"query": {
"range" : {
"identification.numberOfEmployees.value" : {
"gt" : "5",
"lt" : "10"
}
}
}
}
When I am trying to execute above query, i am getting empty result, but when I am trying with below query,
{
"query": {
"range" : {
"identification.numberOfEmployees.value" : {
"gt" : "5"
}
}
}
}
I am able to get the result.
Could someone please help me on why its failing in the first scenario.

Thanks & Regards,
Ram Prasad G

If identification.numberOfEmployees.value is a text field, then I believe this is the issue.
You need to change it as a number field.

thank you very much david. that resolved my problem.