Do additional date range filters increase?

For the existing ElasticSearch 5 large index, I want to add a date field containing the index date of each document. Subsequently, I want to query this index to return all documents created at the last minute.

The ElimalSearch Ultimative Guide for version 1 mentions that adding additional filters for the day, month, and / or year can improve performance dramatically. Newer versions of the manual no longer speak.

Is it possible to improve performance in ElasticSearch 5 with the addition of additional date filters?

+5
source share
1 answer

Depending on the size of your index, this will certainly help limit the amount of data that will be taken into account for your request.

If your index contains multi-year data, adding a filter to keep records of documents indexed in the last minute will significantly reduce the amount of data that will be focused on your request.

This was the case with ES 1.x, and this is still the case with ES 5.x, the only difference is that in 1.x you had to properly arrange the filters in order to use the most aggressive filters in the first place. which doesn't matter anymore in 5.x, since ES is now smart enough to run the most aggressive filters first to make sure that they very often filter out unnecessary data during the search process.

+4
source

Source: https://habr.com/ru/post/1269722/


All Articles