I have stored array of hash values in a document but unable to query based on hash. Please help
Here the index details
-
Field name is bids and it stores array of hash values
{"properties": {"bids":{"type":"long"}}} -
Sample document
hits: [
{
_index: "myindex",
_type: "myinfo",
_id: "C18B18",
_score: 1,
_source: {
uid:10
bids: [
3468197663136215600,
-9068197663136215600
]
}
}
]
- Query
curl -XGET 'http://localhost:9200/myindex/myinfo/_search?pretty' -d'
{
"size":1,
"query": {
"filtered" : {
"query" : {
"query_string" : {
"query": "( bids:3468197663136215600 )"
}
}
}
}
}'
Result I see is
{
"took" : 5,
"timed_out" : false,
"_shards" : {
"total" : 2,
"successful" : 2,
"failed" : 0
},
"hits" : {
"total" : 0,
"max_score" : null,
"hits" : [ ]
}
}
I should get total =1, but I am seeing total =0.
some one please help me.