Hi Clinton,
I have a use-case where I have to query elastic with multiple (huge number
of) values of a field. ( I get these values from another system, so no
other way but query with all these values)
This field also happens to be the _id of the documents I have indexed.
So in my query, I have a filter like below...
"filter": { "ids" :{
"values" : [1, 3, 4, 6, 7,... (upto 300,000 such
values) ]
}
}
( ...eventually I do a facet with term_stats ... on the docs matching this
filter)
I noticed for 300,000 such values, the query was taking ( on my single
node) .. 3-4 secs to return..
So I am looking for ways to reduce this time.
One thought is, as _id is 'string' type it is probably slower than,
filtering on a long type ?.. am not sure. Actually that's my question.. is
it faster ?
If it is faster, I can duplicate the value of _id as a filed of 'long' type
in the document and have a "terms" filter
Hope it's clear now... Thanks a lot.
....
( Btw.. I have tested solr with this use case, and it was many times slower
than Elasticsearch for such massive list of query terms !! )
On Monday, September 10, 2012 6:06:06 PM UTC-4, Pradeep wrote:
In my query I have to pass many values to filter on.. like
"ids" : {
"values" : [1, 4, 100 ....... (upto 300k such values) ]
}
as _id is of type String.. I am wondering if ,I store the value of _id as
a long filed and filter on it, will it be faster?
please help...
Thanks a lot..
an elaborate explanation is here
Redirecting to Google Groups
--