Skip to content

Commit 1fe2b0d

Browse files
authored
[DOCS] Fix percolate query headings (#83988)
Fixes the heading levels for the percolate query doc so the on-page TOC displays correctly.
1 parent c1aba1e commit 1fe2b0d

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

docs/reference/query-dsl/percolate-query.asciidoc

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ stored in an index. The `percolate` query itself
99
contains the document that will be used as query
1010
to match with the stored queries.
1111

12-
[discrete]
13-
=== Sample usage
12+
==== Sample usage
1413

1514
TIP: To provide a simple example, this documentation uses one index,
1615
`my-index-000001`, for both the percolate queries and documents. This setup can
@@ -124,7 +123,6 @@ The above request will yield the following response:
124123
<2> The `_percolator_document_slot` field indicates which document has matched with this query.
125124
Useful when percolating multiple document simultaneously.
126125

127-
[discrete]
128126
==== Parameters
129127

130128
The following parameters are required when percolating a document:
@@ -150,7 +148,6 @@ In that case the `document` parameter can be substituted with the following para
150148
`preference`:: Optionally, preference to be used to fetch document to percolate.
151149
`version`:: Optionally, the expected version of the document to be fetched.
152150

153-
[discrete]
154151
==== Percolating in a filter context
155152

156153
In case you are not interested in the score, better performance can be expected by wrapping
@@ -185,7 +182,6 @@ should be wrapped in a `constant_score` query or a `bool` query's filter clause.
185182

186183
Note that the `percolate` query never gets cached by the query cache.
187184

188-
[discrete]
189185
==== Percolating multiple documents
190186

191187
The `percolate` query can match multiple documents simultaneously with the indexed percolator queries.
@@ -267,14 +263,12 @@ GET /my-index-000001/_search
267263
<1> The `_percolator_document_slot` indicates that the first, second and last documents specified in the `percolate` query
268264
are matching with this query.
269265

270-
[discrete]
271266
==== Percolating an Existing Document
272267

273268
In order to percolate a newly indexed document, the `percolate` query can be used. Based on the response
274269
from an index request, the `_id` and other meta information can be used to immediately percolate the newly added
275270
document.
276271

277-
[discrete]
278272
===== Example
279273

280274
Based on the previous example.
@@ -332,14 +326,12 @@ case the search request would fail with a version conflict error.
332326

333327
The search response returned is identical as in the previous example.
334328

335-
[discrete]
336329
==== Percolate query and highlighting
337330

338331
The `percolate` query is handled in a special way when it comes to highlighting. The queries hits are used
339332
to highlight the document that is provided in the `percolate` query. Whereas with regular highlighting the query in
340333
the search request is used to highlight the hits.
341334

342-
[discrete]
343335
===== Example
344336

345337
This example is based on the mapping of the first example.
@@ -557,7 +549,6 @@ The slightly different response:
557549
<1> The highlight fields have been prefixed with the document slot they belong to,
558550
in order to know which highlight field belongs to what document.
559551

560-
[discrete]
561552
==== Specifying multiple percolate queries
562553

563554
It is possible to specify multiple `percolate` queries in a single search request:
@@ -643,7 +634,6 @@ The above search request returns a response similar to this:
643634
<1> The `_percolator_document_slot_query1` percolator slot field indicates that these matched slots are from the `percolate`
644635
query with `_name` parameter set to `query1`.
645636

646-
[discrete]
647637
[[how-it-works]]
648638
==== How it Works Under the Hood
649639

@@ -691,6 +681,7 @@ a different index configuration, like the number of primary shards.
691681

692682
[[percolate-query-notes]]
693683
==== Notes
684+
694685
===== Allow expensive queries
695686
Percolate queries will not be executed if <<query-dsl-allow-expensive-queries, `search.allow_expensive_queries`>>
696687
is set to false.

0 commit comments

Comments
 (0)