mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 06:25:07 +00:00
In Lucene 5.1 lots of filters got deprecated in favour of equivalent queries. Additionally, random-access to filters is now replaced with approximations on scorers. This commit - replaces the deprecated NumericRangeFilter, PrefixFilter, TermFilter and TermsFilter with NumericRangeQuery, PrefixQuery, TermQuery and TermsQuery, wrapped in a QueryWrapperFilter - replaces XBooleanFilter, AndFilter and OrFilter with a BooleanQuery in a QueryWrapperFilter - removes DocIdSets.isBroken: the new two-phase iteration API will now help execute slow filters efficiently - replaces FilterCachingPolicy with QueryCachingPolicy Close #8960
37 lines
619 B
YAML
37 lines
619 B
YAML
---
|
|
"Validate query api":
|
|
- do:
|
|
indices.create:
|
|
index: testing
|
|
body:
|
|
settings:
|
|
number_of_replicas: 0
|
|
|
|
- do:
|
|
cluster.health:
|
|
wait_for_status: yellow
|
|
|
|
- do:
|
|
indices.validate_query:
|
|
q: query string
|
|
|
|
- is_true: valid
|
|
|
|
- do:
|
|
indices.validate_query:
|
|
body:
|
|
query:
|
|
invalid_query: {}
|
|
|
|
- is_false: valid
|
|
|
|
- do:
|
|
indices.validate_query:
|
|
explain: true
|
|
|
|
- is_true: valid
|
|
- match: {_shards.failed: 0}
|
|
- match: {explanations.0.index: 'testing'}
|
|
- match: {explanations.0.explanation: '*:*'}
|
|
|