mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 13:08:29 +00:00
We've had `QueryDSLDocumentationTests` for a while but it had a very hopeful comment at the top about how we want to make sure that the example in the query-dsl docs match up with the test but we never had anything that made *sure* that they did. This changes that! Now the examples from the query-dsl docs are all built from the `QueryDSLDocumentationTests`. All except for the percolator example because that is hard to do as it stands now. To make this easier this change moves `QueryDSLDocumentationTests` from core and into the high level rest client. This is useful for two reasons: 1. We expect the high level rest client to be able to use the builders. 2. The code that builds that docs doesn't check out all of Elasticsearch. It only checks out certain directories. Since we're already including snippets from that directory we don't have to make any changes to that process. Closes #24320
13 lines
541 B
Plaintext
13 lines
541 B
Plaintext
[[java-query-dsl-nested-query]]
|
|
==== Nested Query
|
|
|
|
See {ref}/query-dsl-nested-query.html[Nested Query]
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{query-dsl-test}[nested]
|
|
--------------------------------------------------
|
|
<1> path to nested document
|
|
<2> your query. Any fields referenced inside the query must use the complete path (fully qualified).
|
|
<3> score mode could be `ScoreMode.Max`, `ScoreMode.Min`, `ScoreMode.Total`, `ScoreMode.Avg` or `ScoreMode.None`
|