3

Other than the fact that one is specifically for numerical values, how does the execution differ internally. The docs say :

Numeric Range Filter :

... works by loading all the relevant field values into memory, and checking for the relevant docs if they satisfy the range requirements. This requires more memory..

Range Filter :

Has 2 execution options : (i) index (uses inverted index) (ii) fielddata (loads field data in memory)

Question:

  1. Will the fielddata option of Range filter make it behave similar to Numeric range filter
  2. Why doesn't the Numeric range filter have an index option?
  3. The docs further say for small ranges the index execution is faster: What's considered small here?

If someone can explain it with an example, that would really help.

1 Answer 1

1

The Numeric Range Filter is deprecated. According to the Java API, "This filter will be removed at some point in time in favor for the range filter with the execution mode fielddata."

I think "small" is relative to the full range of values for that field. The meaning of "small" is something you'll have to determine yourself through benchmarking because performance will depend on how much memory is allocated to Elasticsearch and the type of data stored in the field.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.