Skip to content

Commit

Permalink
[SPEC] Add rewrite query parameter to the indices.validate_query API
Browse files Browse the repository at this point in the history
Conflicts:
	rest-api-spec/test/indices.validate_query/10_basic.yaml
  • Loading branch information
gmarz committed Jun 15, 2015
1 parent 36a492a commit a351f43
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rest-api-spec/api/indices.validate_query.json
Expand Up @@ -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."
}
}
},
Expand Down
9 changes: 9 additions & 0 deletions rest-api-spec/test/indices.validate_query/10_basic.yaml
Expand Up @@ -29,6 +29,15 @@
indices.validate_query:
explain: true

- is_true: valid
- 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'}
Expand Down

0 comments on commit a351f43

Please sign in to comment.