Hi there, 

Suppose I have this document:
{
  "user": {
    "uid": 67483951,
  },
  "did": 433036615015882750
}


"uid" and "did" have type of "long" in the mapping.
Its document id is unknown and I would like to fetch the document using 
"did" value via search API.
Therefore, I issue this curl command:

curl -XGET 
"http://eshost:9200/my_index/my_type/_search?q=did:433036615015882750";

Unfortunately, the above curl command is unable to fetch my document. Here 
is the result from the curl command:
{
   "took": 46,
   "timed_out": false,
   "_shards": {
      "total": 20,
      "successful": 20,
      "failed": 0
   },
   "hits": {
      "total": 0,
      "max_score": null,
      "hits": []
   }
}

 However, when I use the "uid" to search, I'm able to fetch the document. 
Here's the curl command for search using "uid"

curl -XGET "http://eshost:9200/my_index/my_type/_search?q=user.uid:67483951";

I tried above with using Java API (using prepareSearch method of transport 
client, with term query), but the results are the same i.e. I can fetch 
using "uid" but I can't fetch using "did". So, the question is how to 
search using large value of "long" as shown in this case?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/9bc36672-cdcb-4edf-ae04-9bfaa49e7cca%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to