Browse Source

[DOCS] Move field collapse content to separate page (#60424)

James Rodewig 5 years ago
parent
commit
af73504865

+ 18 - 11
docs/reference/redirects.asciidoc

@@ -68,7 +68,8 @@ See <<request-body-search-explain>>.
 
 [role="exclude",id="search-request-collapse"]
 === Collapse parameter for request body search API
-See <<request-body-search-collapse>>.
+
+See <<collapse-search-results>>.
 
 [role="exclude",id="search-request-from-size"]
 === From and size parameters for request body search API
@@ -136,7 +137,8 @@ See <<sort-search-results>>.
 
 [role="exclude",id="search-request-source-filtering"]
 === Source filtering parameter for request body search API
-See <<request-body-search-source-filtering>>.
+
+See <<source-filtering>>.
 
 [role="exclude",id="search-request-stored-fields"]
 === Stored fields parameter for request body search API
@@ -964,20 +966,20 @@ For search API reference documentation, see <<search-search>>.
 
 For search examples, see <<run-a-search>>.
 
-[role="exclude",id="request-body-search-from-size"]
-==== From / size
+[role="exclude",id="request-body-search-docvalue-fields"]
+==== Doc value fields
 
-See <<paginate-search-results>>.
+See <<docvalue-fields, doc value fields>>.
 
-[role="exclude",id="request-body-search-source-filtering"]
-==== Source filtering
+[role="exclude",id="request-body-search-collapse"]
+==== Field collapsing
 
-See <<source-filtering, source filtering>>.
+See <<collapse-search-results>>.
 
-[role="exclude",id="request-body-search-docvalue-fields"]
-==== Doc value fields
+[role="exclude",id="request-body-search-from-size"]
+==== From / size
 
-See <<docvalue-fields, doc value fields>>.
+See <<paginate-search-results>>.
 
 [role="exclude",id="request-body-search-highlighting"]
 ==== Highlighting
@@ -990,4 +992,9 @@ See <<how-highlighters-work-internally>>.
 [role="exclude",id="request-body-search-sort"]
 ==== Sort
 See <<sort-search-results>>.
+
+[role="exclude",id="request-body-search-source-filtering"]
+==== Source filtering
+
+See <<source-filtering>>.
 ////

+ 12 - 3
docs/reference/search/request-body.asciidoc

@@ -108,9 +108,15 @@ executing a distributed search across the whole cluster and gathering all the
 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]]
 ==== Highlighting
@@ -144,7 +150,10 @@ include::request/search-type.asciidoc[]
 
 See <<sort-search-results>>.
 
-include::request/source-filtering.asciidoc[]
+[[request-body-search-source-filtering]]
+==== Source filtering
+
+See <<source-filtering>>.
 
 include::request/stored-fields.asciidoc[]
 

+ 10 - 8
docs/reference/search/request/collapse.asciidoc

@@ -1,9 +1,10 @@
-[[request-body-search-collapse]]
-==== Field Collapsing
+[[collapse-search-results]]
+=== Collapse search results
 
-Allows to collapse search results based on field values.
-The collapsing is done by selecting only the top sorted document per collapse key.
-For instance the query below retrieves the best tweet for each user and sorts them by number of likes.
+You can use the `collapse` parameter to collapse search results based
+on field values. The collapsing is done by selecting only the top sorted
+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]
 --------------------------------------------------
@@ -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.
 
-
-===== Expand collapse results
+[[expand-collapse-results]]
+==== Expand collapse results
 
 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>>,
 <<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`.
 For example, the following request finds the top scored tweets for

+ 0 - 4
docs/reference/search/request/docvalue-fields.asciidoc

@@ -1,4 +0,0 @@
-[[request-body-search-docvalue-fields]]
-==== Doc value fields
-
-See <<docvalue-fields, doc value fields>>.

+ 0 - 4
docs/reference/search/request/source-filtering.asciidoc

@@ -1,4 +0,0 @@
-[[request-body-search-source-filtering]]
-==== Source filtering
-
-See <<source-filtering, source filtering>>.

+ 2 - 0
docs/reference/search/run-a-search.asciidoc

@@ -270,6 +270,8 @@ include::request/from-size.asciidoc[]
 
 include::search-fields.asciidoc[]
 
+include::request/collapse.asciidoc[]
+
 include::request/highlighting.asciidoc[]
 
 include::request/sort.asciidoc[]