OpenSearch/docs/reference/analysis
Simon Willnauer e81804cfa4 Add a shard filter search phase to pre-filter shards based on query rewriting (#25658)
Today if we search across a large amount of shards we hit every shard. Yet, it's quite
common to search across an index pattern for time based indices but filtering will exclude
all results outside a certain time range ie. `now-3d`. While the search can potentially hit
hundreds of shards the majority of the shards might yield 0 results since there is not document
that is within this date range. Kibana for instance does this regularly but used `_field_stats`
to optimize the indexes they need to query. Now with the deprecation of `_field_stats` and it's upcoming removal a single dashboard in kibana can potentially turn into searches hitting hundreds or thousands of shards and that can easily cause search rejections even though the most of the requests are very likely super cheap and only need a query rewriting to early terminate with 0 results.

This change adds a pre-filter phase for searches that can, if the number of shards are higher than a the `pre_filter_shard_size` threshold (defaults to 128 shards), fan out to the shards
and check if the query can potentially match any documents at all. While false positives are possible, a negative response means that no matches are possible. These requests are not subject to rejection and can greatly reduce the number of shards a request needs to hit. The approach here is preferable to the kibana approach with field stats since it correctly handles aliases and uses the correct threadpools to execute these requests. Further it's completely transparent to the user and improves scalability of elasticsearch in general on large clusters.
2017-07-12 22:19:20 +02:00
..
analyzers Fix language in some docs 2017-04-01 14:45:44 -04:00
charfilters Add a shard filter search phase to pre-filter shards based on query rewriting (#25658) 2017-07-12 22:19:20 +02:00
tokenfilters Parse synonyms with the same analysis chain (#8049) 2017-06-20 21:50:33 +09:00
tokenizers Add a shard filter search phase to pre-filter shards based on query rewriting (#25658) 2017-07-12 22:19:20 +02:00
analyzers.asciidoc First pass at improving analyzer docs (#18269) 2016-05-11 14:17:56 +02:00
anatomy.asciidoc Correction of the names of numirals (#21531) 2016-11-25 14:30:49 +01:00
charfilters.asciidoc Hindu-Arabico-Latino Numerals (#22476) 2017-01-10 15:24:56 +01:00
normalizers.asciidoc Update normalizers.asciidoc 2017-02-07 12:09:39 +01:00
testing.asciidoc Remove wait_for_status=yellow from the docs 2016-07-15 16:02:07 -04:00
tokenfilters.asciidoc Add missing link for the WordDelimiterGraphFilter 2017-04-28 17:12:38 +02:00
tokenizers.asciidoc Rename simple pattern tokenizers (#25300) 2017-06-19 13:48:43 -07:00