I have a document indexed whose structure is as follows:
{
"_index": "yelp",
"_type": "user",
"_id": "ABC",
"_score": 1,
"_source": {
"yelping_since": "2007-07",
"votes": {},
"review_count": 1798,
"name": "TEST_USER",
"user_id": "123",
"friends": [],
"fans": 89,
"average_stars": 3.48,
"type": "user",
"compliments": {},
"elite": []
}
}
When I search with ES POST/_search
{
"fields" : ["name", "user_id"],
"query" : {
"term" : { "_id" : "ABC" }
}
}
One document is returned.
But when I search for document using a specific field like "user_id", no documents are fetched.
{
"fields" : ["name", "user_id"],
"query" : {
"term" : { "user_id" : "123" }
}
}
Any idea why? I have not used any custom mapping while indexing the documents. Any help is appreciated.
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/29a3c2a0-ccc2-488b-96c4-429617defec9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.