OpenSearch/docs/reference/search
Nik Everett 13a86fec99 Add magic $_path stash key to docs tests ()
Adds a "magic" key to the yaml testing stash mostly for use with
documentation tests. When unstashing an object, `$_path` is the
path into the current position in the object you are unstashing.
This means that in docs tests you can use
`// TESTRESPONSEs/somevalue/$body.${_path}/` to mean "replace
`somevalue` with whatever is the response in the same position."

Compare how you must carefully mock out all the numbers in the profile
response without this change:
```
// TESTRESPONSE[s/"id": "\[2aE02wS1R8q_QFnYu6vDVQ\]\[twitter\]\[1\]"/"id": $body.profile.shards.0.id/]
// TESTRESPONSE[s/"rewrite_time": 51443/"rewrite_time": $body.profile.shards.0.searches.0.rewrite_time/]
// TESTRESPONSE[s/"score": 51306/"score": $body.profile.shards.0.searches.0.query.0.breakdown.score/]
// TESTRESPONSE[s/"time_in_nanos": "1873811"/"time_in_nanos": $body.profile.shards.0.searches.0.query.0.time_in_nanos/]
// TESTRESPONSE[s/"build_scorer": 2935582/"build_scorer": $body.profile.shards.0.searches.0.query.0.breakdown.build_scorer/]
// TESTRESPONSE[s/"create_weight": 919297/"create_weight": $body.profile.shards.0.searches.0.query.0.breakdown.create_weight/]
// TESTRESPONSE[s/"next_doc": 53876/"next_doc": $body.profile.shards.0.searches.0.query.0.breakdown.next_doc/]
// TESTRESPONSE[s/"time_in_nanos": "391943"/"time_in_nanos": $body.profile.shards.0.searches.0.query.0.children.0.time_in_nanos/]
// TESTRESPONSE[s/"score": 28776/"score": $body.profile.shards.0.searches.0.query.0.children.0.breakdown.score/]
// TESTRESPONSE[s/"build_scorer": 784451/"build_scorer": $body.profile.shards.0.searches.0.query.0.children.0.breakdown.build_scorer/]
// TESTRESPONSE[s/"create_weight": 1669564/"create_weight": $body.profile.shards.0.searches.0.query.0.children.0.breakdown.create_weight/]
// TESTRESPONSE[s/"next_doc": 10111/"next_doc": $body.profile.shards.0.searches.0.query.0.children.0.breakdown.next_doc/]
// TESTRESPONSE[s/"time_in_nanos": "210682"/"time_in_nanos": $body.profile.shards.0.searches.0.query.0.children.1.time_in_nanos/]
// TESTRESPONSE[s/"score": 4552/"score": $body.profile.shards.0.searches.0.query.0.children.1.breakdown.score/]
// TESTRESPONSE[s/"build_scorer": 42602/"build_scorer": $body.profile.shards.0.searches.0.query.0.children.1.breakdown.build_scorer/]
// TESTRESPONSE[s/"create_weight": 89323/"create_weight": $body.profile.shards.0.searches.0.query.0.children.1.breakdown.create_weight/]
// TESTRESPONSE[s/"next_doc": 2852/"next_doc": $body.profile.shards.0.searches.0.query.0.children.1.breakdown.next_doc/]
// TESTRESPONSE[s/"time_in_nanos": "304311"/"time_in_nanos": $body.profile.shards.0.searches.0.collector.0.time_in_nanos/]
// TESTRESPONSE[s/"time_in_nanos": "32273"/"time_in_nanos": $body.profile.shards.0.searches.0.collector.0.children.0.time_in_nanos/]
```

To how you can cavalierly mock all the numbers at once with this change:
```
// TESTRESPONSE[s/(?<=[" ])\d+(\.\d+)?/$body.$_path/]
```
2017-05-23 15:33:48 -04:00
..
request Identify documents by their `_id`. () 2017-05-09 16:33:52 +02:00
suggesters Removed deprecated template query. 2017-05-11 14:56:45 +02:00
count.asciidoc Remove `lowercase_expanded_terms` and `locale` from query-parser options. () 2016-11-02 14:25:08 +01:00
explain.asciidoc Nested queries should avoid adding unnecessary filters when possible. () 2017-02-14 16:05:19 +01:00
field-caps.asciidoc Fix FieldCaps documentation 2017-05-02 10:14:47 +02:00
field-stats.asciidoc Deprecate _field_stats endpoint () 2017-04-10 10:10:16 +02:00
multi-search.asciidoc Remove ldjson support and document ndjson for bulk/msearch () 2017-02-08 11:55:50 -05:00
profile.asciidoc Add magic $_path stash key to docs tests () 2017-05-23 15:33:48 -04:00
request-body.asciidoc Added docs for batched_reduce_size 2017-05-02 14:25:03 +02:00
search-shards.asciidoc Include all aliases including non-filtering in `_search_shards` response () 2017-05-05 09:34:12 +02:00
search-template.asciidoc Fix search template documentation reference to scripting security. 2017-05-18 14:27:58 -07:00
search.asciidoc Set shard count limit to unlimited () 2017-04-10 17:09:21 +02:00
suggesters.asciidoc Use `typed_keys` parameter to prefix suggester names by type in search responses () 2017-02-10 10:53:38 +01:00
uri-request.asciidoc Added docs for batched_reduce_size 2017-05-02 14:25:03 +02:00
validate.asciidoc Do not index `_type` when there is at most one type. () 2017-05-04 16:29:35 +02:00