Upper limits on terms filter array size

(Bruno Miranda) #1

Curious if anyone know of the limitations of passing a terms filter a very large array of strings to filter one. I have tried with a few hundred and it's fine. Wondering what happens when it gets to 3-5k.

I am considering using terms filter lookup to at least save on the http request time of posting a large JSON body, but wondering regarding the limitations of the actual search back end.

(Adrien Grand) #2

I don't think elasticsearch enforces any limits here. However beware that the more terms you add to a terms filter, the slower it will get.

(Bruno Miranda) #3

Thanks for the reply. Yes I haven't been cut off, but was wondering what the realistic soft-limit would be. I guess it's highly dependent on cluster/index size.

(Mark Walkom) #4

Basically, yes.

If you are getting into the hundreds of thousands you will probably get into trouble.

(Bruno Miranda) #5

Ok, will keep it around a few thousand at most.

(system) #6