6

I need to send a large bunch of ids in terms query, and i tried with approx 2000 guids, but I found that the data is not being posted to elasticseach. Json array was empty. Is there any limit to max count of values in terms query??and is there any config setting that can increase the max query length for terms query.

I just tried to find out on web if its the json_encode function that does not support such a large array size to encode, but its not the case, so second thing that came to my mind is if elasticsearch terms query supports this or not??

Any help or guidance will be highly appreciated.

harsha
  • 279
  • 2
  • 8
  • Where your trying this using command line or sense plugin? You can pass that much ids in terms no problem at all. I am using such queries. – Roopendra Mar 14 '14 at 07:06
  • 1
    http://stackoverflow.com/questions/26642369/max-limit-on-the-number-of-values-i-can-specify-in-the-ids-filter-or-generally-q – sojin Jul 28 '16 at 10:31

1 Answers1

2

If you are using a bool filter or query, it looks like there is a limit of 1024 clauses. See this.

https://groups.google.com/forum/#!topic/elasticsearch/LqywKHKWbeI

Based on that same link, it also appears that you can the option in your elasticsearch.yml

crlane
  • 521
  • 5
  • 16
  • Thanks, It helps me with the same problem – Sapikelio Nov 25 '15 at 12:35
  • 3
    When I follow your link I end up on google groups where it tells me that no such group exists. It would have been good to post the configuration setting in your answer as well. Although it's likely that this information would be outdated with ES 5+ anyway. – philnate Nov 15 '17 at 08:20
  • @philnate Would this link work instead? https://discuss.elastic.co/t/query-string-length-limit/16972 – Iching Chang Aug 29 '20 at 23:32
  • Here is another related thread: https://stackoverflow.com/questions/40275514/elasticsearch-set-max-clause-count – Iching Chang Aug 29 '20 at 23:39