Skip to content

Commit

Permalink
[DOCS] fixed count and validate query docs, they now require a top-le…
Browse files Browse the repository at this point in the history
…vel query object, same as other apis

Relates to #4074
Closes #5111
  • Loading branch information
javanna committed Feb 13, 2014
1 parent 32a2ff2 commit f0c70b3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/reference/docs/delete-by-query.asciidoc
Expand Up @@ -19,6 +19,9 @@ $ curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{
'
--------------------------------------------------

NOTE: The query being sent in the body must be nested in a `query` key, same as
the <<search-search,search api>> works added[1.0.0.RC1,The query was previously the top-level object].

Both above examples end up doing the same thing, which is delete all
tweets from the twitter index for a certain user. The result of the
commands is:
Expand Down
3 changes: 3 additions & 0 deletions docs/reference/search/count.asciidoc
Expand Up @@ -18,6 +18,9 @@ $ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
}'
--------------------------------------------------

NOTE: The query being sent in the body must be nested in a `query` key, same as
the <<search-search,search api>> works added[1.0.0.RC1,The query was previously the top-level object].

Both examples above do the same thing, which is count the number of
tweets from the twitter index for a certain user. The result is:

Expand Down
3 changes: 3 additions & 0 deletions docs/reference/search/validate.asciidoc
Expand Up @@ -42,6 +42,9 @@ curl -XGET 'http://localhost:9200/twitter/tweet/_validate/query' -d '{
{"valid":true,"_shards":{"total":1,"successful":1,"failed":0}}
--------------------------------------------------

NOTE: The query being sent in the body must be nested in a `query` key, same as
the <<search-search,search api>> works added[1.0.0.RC1,The query was previously the top-level object].

If the query is invalid, `valid` will be `false`. Here the query is
invalid because Elasticsearch knows the post_date field should be a date
due to dynamic mapping, and 'foo' does not correctly parse into a date:
Expand Down

0 comments on commit f0c70b3

Please sign in to comment.