In case of Massive number of Filter items, which is faster? Filter by _id or Filter by a long field..?

Thanks Clinton. I'll try that out and post.

Hi Paul, I am afraid, that's not possible, this list of values is a
result of another search, which is served by a different search engine..
(this data cant be put into that engine. nor the other way around) .. so
only way is to pass so many values...

On Tuesday, September 11, 2012 12:03:43 PM UTC-4, P Hill wrote:

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) ] 
         } 

Is it possible you could do some pre-processing to work out your large
sets and already have that information in the index?
If you can pre-process and generate data before the time of the users
query do it! I'd bet that finding fewer terms in an (untokenized)
additional field would be even faster than sending Ks of IDs.

-Paul

--