[SPEC] Add rewrite query parameter to the indices.validate_query API

This commit is contained in:
gmarz 2015-06-15 11:10:51 -04:00
parent e817393c8d
commit 8dd7dae5b9
2 changed files with 13 additions and 0 deletions

View File

@ -66,6 +66,10 @@
"lowercase_expanded_terms": {
"type" : "boolean",
"description" : "Specify whether query terms should be lowercased"
},
"rewrite": {
"type": "boolean",
"description": "Provide a more detailed explanation showing the actual Lucene query that will be executed."
}
}
},

View File

@ -33,4 +33,13 @@
- match: {_shards.failed: 0}
- match: {explanations.0.index: 'testing'}
- match: {explanations.0.explanation: '*:*'}
- do:
indices.validate_query:
rewrite: true
- is_true: valid
- match: {_shards.failed: 0}
- match: {explanations.0.index: 'testing'}
- match: {explanations.0.explanation: 'ConstantScore(*:*)'}