mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-22 21:05:23 +00:00
parent
b3da548dab
commit
b17ae33b3a
@ -62,7 +62,8 @@ See <<request-body-search-explain>>.
|
|||||||
|
|
||||||
[role="exclude",id="search-request-collapse"]
|
[role="exclude",id="search-request-collapse"]
|
||||||
=== Collapse parameter for request body search API
|
=== Collapse parameter for request body search API
|
||||||
See <<request-body-search-collapse>>.
|
|
||||||
|
See <<collapse-search-results>>.
|
||||||
|
|
||||||
[role="exclude",id="search-request-from-size"]
|
[role="exclude",id="search-request-from-size"]
|
||||||
=== From and size parameters for request body search API
|
=== From and size parameters for request body search API
|
||||||
@ -130,7 +131,8 @@ See <<sort-search-results>>.
|
|||||||
|
|
||||||
[role="exclude",id="search-request-source-filtering"]
|
[role="exclude",id="search-request-source-filtering"]
|
||||||
=== Source filtering parameter for request body search API
|
=== Source filtering parameter for request body search API
|
||||||
See <<request-body-search-source-filtering>>.
|
|
||||||
|
See <<source-filtering>>.
|
||||||
|
|
||||||
[role="exclude",id="search-request-stored-fields"]
|
[role="exclude",id="search-request-stored-fields"]
|
||||||
=== Stored fields parameter for request body search API
|
=== Stored fields parameter for request body search API
|
||||||
@ -922,21 +924,21 @@ For search API reference documentation, see <<search-search>>.
|
|||||||
|
|
||||||
For search examples, see <<run-a-search>>.
|
For search examples, see <<run-a-search>>.
|
||||||
|
|
||||||
[role="exclude",id="request-body-search-from-size"]
|
|
||||||
==== From / size
|
|
||||||
|
|
||||||
See <<paginate-search-results>>.
|
|
||||||
|
|
||||||
[role="exclude",id="request-body-search-source-filtering"]
|
|
||||||
==== Source filtering
|
|
||||||
|
|
||||||
See <<source-filtering, source filtering>>.
|
|
||||||
|
|
||||||
[role="exclude",id="request-body-search-docvalue-fields"]
|
[role="exclude",id="request-body-search-docvalue-fields"]
|
||||||
==== Doc value fields
|
==== Doc value fields
|
||||||
|
|
||||||
See <<docvalue-fields, doc value fields>>.
|
See <<docvalue-fields, doc value fields>>.
|
||||||
|
|
||||||
|
[role="exclude",id="request-body-search-collapse"]
|
||||||
|
==== Field collapsing
|
||||||
|
|
||||||
|
See <<collapse-search-results>>.
|
||||||
|
|
||||||
|
[role="exclude",id="request-body-search-from-size"]
|
||||||
|
==== From / size
|
||||||
|
|
||||||
|
See <<paginate-search-results>>.
|
||||||
|
|
||||||
[role="exclude",id="request-body-search-highlighting"]
|
[role="exclude",id="request-body-search-highlighting"]
|
||||||
==== Highlighting
|
==== Highlighting
|
||||||
See <<highlighting>>.
|
See <<highlighting>>.
|
||||||
@ -948,4 +950,9 @@ See <<how-highlighters-work-internally>>.
|
|||||||
[role="exclude",id="request-body-search-sort"]
|
[role="exclude",id="request-body-search-sort"]
|
||||||
==== Sort
|
==== Sort
|
||||||
See <<sort-search-results>>.
|
See <<sort-search-results>>.
|
||||||
|
|
||||||
|
[role="exclude",id="request-body-search-source-filtering"]
|
||||||
|
==== Source filtering
|
||||||
|
|
||||||
|
See <<source-filtering>>.
|
||||||
////
|
////
|
||||||
|
@ -108,9 +108,15 @@ executing a distributed search across the whole cluster and gathering all the
|
|||||||
results.
|
results.
|
||||||
|
|
||||||
|
|
||||||
include::request/docvalue-fields.asciidoc[]
|
[[request-body-search-docvalue-fields]]
|
||||||
|
==== Doc value fields
|
||||||
|
|
||||||
include::request/collapse.asciidoc[]
|
See <<docvalue-fields>>.
|
||||||
|
|
||||||
|
[[request-body-search-collapse]]
|
||||||
|
==== Field collapsing
|
||||||
|
|
||||||
|
See <<collapse-search-results>>.
|
||||||
|
|
||||||
[[request-body-search-highlighting]]
|
[[request-body-search-highlighting]]
|
||||||
==== Highlighting
|
==== Highlighting
|
||||||
@ -144,7 +150,10 @@ include::request/search-type.asciidoc[]
|
|||||||
|
|
||||||
See <<sort-search-results>>.
|
See <<sort-search-results>>.
|
||||||
|
|
||||||
include::request/source-filtering.asciidoc[]
|
[[request-body-search-source-filtering]]
|
||||||
|
==== Source filtering
|
||||||
|
|
||||||
|
See <<source-filtering>>.
|
||||||
|
|
||||||
include::request/stored-fields.asciidoc[]
|
include::request/stored-fields.asciidoc[]
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
[[request-body-search-collapse]]
|
[[collapse-search-results]]
|
||||||
==== Field Collapsing
|
=== Collapse search results
|
||||||
|
|
||||||
Allows to collapse search results based on field values.
|
You can use the `collapse` parameter to collapse search results based
|
||||||
The collapsing is done by selecting only the top sorted document per collapse key.
|
on field values. The collapsing is done by selecting only the top sorted
|
||||||
For instance the query below retrieves the best tweet for each user and sorts them by number of likes.
|
document per collapse key. For instance the query below retrieves the best tweet
|
||||||
|
for each user and sorts them by number of likes.
|
||||||
|
|
||||||
[source,console]
|
[source,console]
|
||||||
--------------------------------------------------
|
--------------------------------------------------
|
||||||
@ -34,8 +35,8 @@ The field used for collapsing must be a single valued <<keyword, `keyword`>> or
|
|||||||
|
|
||||||
NOTE: The collapsing is applied to the top hits only and does not affect aggregations.
|
NOTE: The collapsing is applied to the top hits only and does not affect aggregations.
|
||||||
|
|
||||||
|
[[expand-collapse-results]]
|
||||||
===== Expand collapse results
|
==== Expand collapse results
|
||||||
|
|
||||||
It is also possible to expand each collapsed top hits with the `inner_hits` option.
|
It is also possible to expand each collapsed top hits with the `inner_hits` option.
|
||||||
|
|
||||||
@ -117,7 +118,8 @@ The default is based on the number of data nodes and the default search thread p
|
|||||||
WARNING: `collapse` cannot be used in conjunction with <<request-body-search-scroll, scroll>>,
|
WARNING: `collapse` cannot be used in conjunction with <<request-body-search-scroll, scroll>>,
|
||||||
<<request-body-search-rescore, rescore>> or <<request-body-search-search-after, search after>>.
|
<<request-body-search-rescore, rescore>> or <<request-body-search-search-after, search after>>.
|
||||||
|
|
||||||
===== Second level of collapsing
|
[[second-level-of-collapsing]]
|
||||||
|
==== Second level of collapsing
|
||||||
|
|
||||||
Second level of collapsing is also supported and is applied to `inner_hits`.
|
Second level of collapsing is also supported and is applied to `inner_hits`.
|
||||||
For example, the following request finds the top scored tweets for
|
For example, the following request finds the top scored tweets for
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
[[request-body-search-docvalue-fields]]
|
|
||||||
==== Doc value fields
|
|
||||||
|
|
||||||
See <<docvalue-fields, doc value fields>>.
|
|
@ -1,4 +0,0 @@
|
|||||||
[[request-body-search-source-filtering]]
|
|
||||||
==== Source filtering
|
|
||||||
|
|
||||||
See <<source-filtering, source filtering>>.
|
|
@ -272,6 +272,8 @@ include::request/from-size.asciidoc[]
|
|||||||
|
|
||||||
include::search-fields.asciidoc[]
|
include::search-fields.asciidoc[]
|
||||||
|
|
||||||
|
include::request/collapse.asciidoc[]
|
||||||
|
|
||||||
include::request/highlighting.asciidoc[]
|
include::request/highlighting.asciidoc[]
|
||||||
|
|
||||||
include::request/sort.asciidoc[]
|
include::request/sort.asciidoc[]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user