OpenSearch/docs/reference/search/request
Jim Ferenczi e48bc2eed7 Add field collapsing for search request (#22337)
* Add top hits collapsing to search request

The field collapsing is done with a custom top docs collector that "collapse" search hits with same field value.
The distributed aspect is resolve using the two passes that the regular search uses. The first pass "collapse" the top hits, then the coordinating node merge/collapse the top hits from each shard.

```
GET _search
{
   "collapse": {
      "field": "category",
   }
}
```

This change also adds an ExpandCollapseSearchResponseListener that intercepts the search response and expands collapsed hits using the CollapseBuilder#innerHit} options.
The retrieval of each inner_hits is done by sending a query to all shards filtered by the collapse key.

```
GET _search
{
   "collapse": {
      "field": "category",
      "inner_hits": {
	"size": 2
      }
   }
}
```
2017-01-23 16:33:51 +01:00
..
collapse.asciidoc Add field collapsing for search request (#22337) 2017-01-23 16:33:51 +01:00
docvalue-fields.asciidoc Bad asciidoc link 2016-07-04 11:02:06 +02:00
explain.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
from-size.asciidoc Add CONSOLE to from/size docs 2016-05-18 11:54:41 +02:00
highlighting.asciidoc Docs: Fix the first highlighting example to work 2017-01-17 12:20:03 +01:00
index-boost.asciidoc Resolve index names in indices_boost 2016-12-11 21:41:49 +09:00
inner-hits.asciidoc Fix typos in inner-hits documentation (#19910) 2016-08-11 21:15:11 +02:00
min-score.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
named-queries-and-filters.asciidoc Add indent 2016-05-19 09:33:29 +02:00
post-filter.asciidoc Add CONSOLE to post-filter 2016-05-18 14:31:04 +02:00
preference.asciidoc Change separator for shards preference 2016-10-07 07:17:01 -05:00
query.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
rescore.asciidoc Update rescoring docs in respect to sort (#20477) 2016-09-14 17:07:10 +01:00
script-fields.asciidoc cutover some docs to painless 2016-06-27 09:55:16 -04:00
scroll.asciidoc Documentation updates for scroll API size parameter (#21229) 2016-11-01 15:55:09 -04:00
search-after.asciidoc Convert search-after tests to // CONSOLE 2016-05-18 06:37:13 -04:00
search-type.asciidoc Remove the scan and count search types. 2015-09-07 15:18:45 +02:00
sort.asciidoc State default sort order on missing values 2017-01-13 17:05:13 +01:00
source-filtering.asciidoc Fixed naming inconsistency for fields/stored_fields in the APIs (#20166) 2016-09-13 20:54:41 +02:00
stored-fields.asciidoc typo fix (it self -> itself) (#21781) 2016-11-24 17:11:43 +01:00
version.asciidoc Add CONSOLE to version docs 2016-05-18 15:32:48 +02:00