OpenSearch/docs/reference/search
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
..
request Add field collapsing for search request (#22337) 2017-01-23 16:33:51 +01:00
suggesters Deprecate _suggest endpoint in favour of _search (#20305) 2016-12-14 21:49:53 -05:00
count.asciidoc Remove `lowercase_expanded_terms` and `locale` from query-parser options. (#20208) 2016-11-02 14:25:08 +01:00
explain.asciidoc Upgrade to lucene-6.4.0-snapshot-ec38570 (#21853) 2016-11-29 18:40:31 +01:00
field-stats.asciidoc Include unindexed field in FieldStats response (#21821) 2016-12-06 13:32:57 +01:00
multi-search.asciidoc Add docs to template support for _msearch (#17382) 2016-09-13 13:19:25 +02:00
profile.asciidoc [DOCS] Fix inconsistent formatting for fieldnames in profile.asciidoc 2017-01-18 10:41:22 +01:00
request-body.asciidoc CONSOLEify some search docs 2016-09-14 13:06:37 -04:00
search-shards.asciidoc Add indices and filter information to search shards api output (#21738) 2016-11-22 23:00:25 +01:00
search-template.asciidoc [DOC] Document {{url}} mustache function (#22549) 2017-01-12 14:57:03 +01:00
search.asciidoc CONSOLEify some search docs 2016-09-14 13:06:37 -04:00
suggesters.asciidoc Deprecate _suggest endpoint in favour of _search (#20305) 2016-12-14 21:49:53 -05:00
uri-request.asciidoc Remove `lowercase_expanded_terms` and `locale` from query-parser options. (#20208) 2016-11-02 14:25:08 +01:00
validate.asciidoc Disable _all by default 2017-01-11 16:47:13 -07:00