I have an index named "bank"(added from this link), with sample data like:
{
"account_number" : 25,
"balance" : 40540,
"firstname" : "Virginia",
"lastname" : "Ayala",
"age" : 39,
"gender" : "F",
"address" : "171 Putnam Avenue",
"employer" : "Filodyne",
"email" : "virginiaayala@filodyne.com",
"city" : "Nicholson",
"state" : "PA"
}
When I do request body search it works for some keys and for some it doesn't. For e.g
GET /bank/_search
{
"query" : {
"term" : {"age" : 39}
}
}
Above request works, while the below one doesn't return any response(0 response)
GET /bank/_search
{
"query" : {
"term" : {"firstname" : "Virginia"}
}
}
What is reason for above? What should be done to fetch the result based on any keys