Array size inside of terms query cannot exceed 1000 indices


(dannalieth) #1

I have a query like so:

"filter": { "query": { "terms": { "user": ["jonh", "doe", ..., "asdf"]} } }

The number of users in the array is arbitrarily big for our use case. However, ElasticSearch seems to fail with "SearchPhaseExecutionException[Failed to execute phase [query], total failure; when the size of the array surpasses 1027.

Is this the expected behavior? If so, is there a way to increase the size of the accepted array?


(Alexander Reelsen) #2

Hey,

just as a side node, the terms filter lookup functionality may help you a
lot, see
http://www.elasticsearch.org/guide/reference/query-dsl/terms-filter/

--Alex

On Thu, Jul 25, 2013 at 7:55 PM, dannalieth diran.d.li@gmail.com wrote:

I have a query like so:

"filter": { "query": { "terms": { "user": ["jonh", "doe", ..., "asdf"]} } }

The number of users in the array is arbitrarily big for our use case.
However, ElasticSearch seems to fail with
"SearchPhaseExecutionException[Failed to execute phase [query], total
failure; when the size of the array surpasses 1027.

Is this the expected behavior? If so, is there a way to increase the size
of
the accepted array?

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Array-size-inside-of-terms-query-cannot-exceed-1000-indices-tp4038659.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


(Vicente de Rivera III) #3

I hope it's okay to necro this topic. My question is for this topic.

When using the terms lookup mechanism, is the filter cached? I have like 10,000 list string values (account names) that can change every X minutes (may 5 to 15 minutes). This list is a list of account names that are online, hence they can change at least every 15mins.

Taken from the doc(2.x):

Also, consider using an index with a single shard and fully replicated across all nodes if the "reference" terms data is not large

Does 10,000 considered as large?


(system) #4