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.
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.
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.
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.
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.
Your retweet ids are close to the maximum double value. Can you check that
your retweet ids are actually mapped as longs (not double) and try to
reproduce from the command line with curl (instead of say from a browser or
any programming language since some of them would store all numbers as
doubles)?
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.
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.