Hi,

The term query aims at querying documents based on the raw bytes of a term.
It is not aware of your field mappings while numeric terms are not encoded
verbatim: they use a special binary encoding that allows the binary
representation of the numbers to be sortable lexicographically. Switching
to the match[1] query instead of term should fix the issue.

[1]
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-match-query.html

On Mon, Oct 20, 2014 at 1:40 PM, vineeth mohan <[email protected]>
wrote:

> Hi ,
>
> I am extracting tweets from twitter and i found the following issue.
> On doing a terms facet on field retweet.id , i received some user ID's.
> Now on doing a term query on one of the value obtained , I am not getting
> any result.
>
> The facet is as following  -
> {
>   "facets": {
>     "terms": {
>       "terms": {
>         "field": "retweet.id",
>         "size": 10,
>         "order": "count",
>         "exclude": []
>       }
> }
> I received value 524145031945877919 using the faceting over field
> retweet.id as the top first.
>
> facets: {
>
>    - terms: {
>       - _type: terms
>       - missing: 1251
>       - total: 1213
>       - other: 984
>       - terms: [
>          - {
>             - term: 524145031945877919
>             - count: 53
>          }
>          - {
>
>
> Now i executed the following -
>
> {
>    "query" : {
>                "term" : {
>                                "retweet.id" : 524145031945877919
>                            }
>                  }
> }
> Its giving me 0 results.
>
> Kindly point out , what is the issue.
>
> Thanks
>              Vineeth
>
> --
> 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/CAGdPd5nnjxV-_DpVKg1Ewcuq7wxrDsg48fkdo5OA92jENy9d2Q%40mail.gmail.com
> <https://groups.google.com/d/msgid/elasticsearch/CAGdPd5nnjxV-_DpVKg1Ewcuq7wxrDsg48fkdo5OA92jENy9d2Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Adrien Grand

-- 
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/CAL6Z4j5KNUhw%2BGSP_N1ZSWZWisGFHbmgTNz2YE10QMJDBXtq4Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to