ES Version: 0.20.6
Platform: Bodhi Linux, single instance
I'm still learning ES, so excuse me if this is a basic mistake with my
understanding of how ES works
I have created an index with name mastercatalog, Refer this gist for the
details and have loaded a sample set of data
Following Query works, but if I replace "name" with "partnumber" I don't
seem to get any results back
It almost appears that only if my field value is a string (with all
characters) it seems to return results, but if my string has some numbers
in it I don't get
a response back.
Request:
curl -XPOST 'http://localhost:9200/mastercatalog/_search?pretty=true' -d '{
"query": {
"filtered": {
"query": {
"bool": {
"must": [{"term": {"name" :"auchan" }}]
}
},
"filter": {
"has_child": {
"type": "product",
"query": {
"filtered": {
"query": {
"bool": {
"must": [{"term": {"name": "toys"}}]
}
},
"filter": {
"has_child": {
"type": "variation",
"query": {
"term": {
"trademark": "tiger"
}
}
}
}
}
}
}
}
}
}
}'
Response:
{ "took" : 12, "timed_out" : false, "_shards" : { "total" : 5, "successful"
: 5, "failed" : 0 }, "hits" : { "total" : 1, "max_score" : 1.4054651,
"hits" : [ { "_index" : "mastercatalog", "_type" : "10101", "_id" :
"10101", "_score" : 1.4054651, "_source" : { "name" : "auchan", "owner" :
"chris" } } ] } }
Request that does not work (I replaced{"name": "toys"} with {"partnumber":
"EI-01G-1"}):
curl -XPOST 'http://localhost:9200/mastercatalog/_search?pretty=true' -d '{
"query": { "filtered": { "query": { "bool": { "must": [{"term": {"name"
:"auchan" }}] } }, "filter": { "has_child": { "type": "product", "query": {
"filtered": { "query": { "bool": { "must": [{"term": {"partnumber":
"EI-01G-1"}}] } }, "filter": { "has_child": { "type": "variation", "query":
{ "term": { "trademark": "tiger" } } } } } } } } } } }'
--
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.
For more options, visit https://groups.google.com/groups/opt_out.