Skip to content

Commit 666f446

Browse files
Add descriptions for queries H-Q (#2213)
* Add descriptions for queries H-Q * Apply suggestions from code review Co-authored-by: James Rodewig <[email protected]> * Review feedback * Updated output schema --------- Co-authored-by: James Rodewig <[email protected]>
1 parent 4f03da2 commit 666f446

File tree

8 files changed

+1164
-112
lines changed

8 files changed

+1164
-112
lines changed

output/schema/schema.json

Lines changed: 381 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,4 +416,25 @@ query-dsl-fuzzy-query,https://www.elastic.co/guide/en/elasticsearch/reference/{b
416416
query-dsl-geo-bounding-box-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-geo-bounding-box-query.html
417417
query-dsl-geo-distance-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-geo-distance-query.html
418418
distance-units,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#distance-units
419-
query-dsl-geo-shape-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-geo-shape-query.html
419+
query-dsl-geo-shape-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-geo-shape-query.html
420+
query-dsl-has-child-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-has-child-query.html
421+
inner-hits,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/inner-hits.html
422+
query-dsl-has-parent-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-has-parent-query.html
423+
query-dsl-ids-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-ids-query.html
424+
query-dsl-intervals-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-intervals-query.html
425+
analysis,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/analysis.html
426+
query-dsl-minimum-should-match,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-minimum-should-match.html
427+
query-dsl-match-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-match-query.html
428+
query-dsl-match-all-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-match-all-query.html
429+
query-dsl-match-bool-prefix-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-match-bool-prefix-query.html
430+
query-dsl-match-none-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-match-all-query.html#query-dsl-match-none-query
431+
query-dsl-match-query-phrase,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-match-query-phrase.html
432+
query-dsl-match-query-phrase-prefix,https://www.elastic.co/guide/en/elasticsearch/reference/query-dsl-mlt-query,{branch}/query-dsl-match-query-phrase-prefix.html
433+
https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-mlt-query.html
434+
query-dsl-multi-match-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-multi-match-query.html
435+
query-dsl-nested-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-nested-query.html
436+
query-dsl-parent-id-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-parent-id-query.html
437+
query-dsl-percolate-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-percolate-query.html
438+
query-dsl-pinned-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-pinned-query.html
439+
query-dsl-prefix-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-prefix-query.html
440+
query-dsl-query-string-query,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/query-dsl-query-string-query.html

specification/_global/search/_types/hits.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,20 @@ export enum TotalHitsRelation {
104104
}
105105

106106
export class InnerHits {
107+
/**
108+
* The name for the particular inner hit definition in the response.
109+
* Useful when a search request contains multiple inner hits.
110+
*/
107111
name?: Name
112+
/**
113+
* The maximum number of hits to return per `inner_hits`.
114+
* @server_default 3
115+
*/
108116
size?: integer
117+
/**
118+
* Inner hit starting document offset.
119+
* @server_default 0
120+
*/
109121
from?: integer
110122
collapse?: FieldCollapse
111123
docvalue_fields?: FieldAndFormat[]
@@ -115,6 +127,10 @@ export class InnerHits {
115127
script_fields?: Dictionary<Field, ScriptField>
116128
seq_no_primary_term?: boolean
117129
fields?: Fields
130+
/**
131+
* How the inner hits should be sorted per `inner_hits`.
132+
* By default, inner hits are sorted by score.
133+
*/
118134
sort?: Sort
119135
_source?: SourceConfig
120136
stored_field?: Fields

specification/_types/query_dsl/abstractions.ts

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,102 @@ export class QueryContainer {
168168
* @doc_id query-dsl-geo-shape-query
169169
*/
170170
geo_shape?: GeoShapeQuery
171+
/**
172+
* Returns parent documents whose joined child documents match a provided query.
173+
* @doc_id query-dsl-has-child-query
174+
*/
171175
has_child?: HasChildQuery
176+
/**
177+
* Returns child documents whose joined parent document matches a provided query.
178+
* @doc_id query-dsl-has-parent-query
179+
*/
172180
has_parent?: HasParentQuery
181+
/**
182+
* Returns documents based on their IDs.
183+
* This query uses document IDs stored in the `_id` field.
184+
* @doc_id query-dsl-ids-query
185+
*/
173186
ids?: IdsQuery
187+
/**
188+
* Returns documents based on the order and proximity of matching terms.
189+
* @doc_id query-dsl-intervals-query
190+
*/
174191
intervals?: SingleKeyDictionary<Field, IntervalsQuery>
192+
/**
193+
* Returns documents that match a provided text, number, date or boolean value.
194+
* The provided text is analyzed before matching.
195+
* @doc_id query-dsl-match-query
196+
*/
175197
match?: SingleKeyDictionary<Field, MatchQuery>
198+
/**
199+
* Matches all documents, giving them all a `_score` of 1.0.
200+
* @doc_id query-dsl-match-all-query
201+
*/
176202
match_all?: MatchAllQuery
203+
/**
204+
* Analyzes its input and constructs a `bool` query from the terms.
205+
* Each term except the last is used in a `term` query.
206+
* The last term is used in a prefix query.
207+
* @doc_id query-dsl-match-bool-prefix-query
208+
*/
177209
match_bool_prefix?: SingleKeyDictionary<Field, MatchBoolPrefixQuery>
210+
/**
211+
* Matches no documents.
212+
* @doc_id query-dsl-match-none-query
213+
*/
178214
match_none?: MatchNoneQuery
215+
/**
216+
* Analyzes the text and creates a phrase query out of the analyzed text.
217+
* @doc_id query-dsl-match-query-phrase
218+
*/
179219
match_phrase?: SingleKeyDictionary<Field, MatchPhraseQuery>
220+
/**
221+
* Returns documents that contain the words of a provided text, in the same order as provided.
222+
* The last term of the provided text is treated as a prefix, matching any words that begin with that term.
223+
* @doc_id query-dsl-match-query-phrase-prefix
224+
*/
180225
match_phrase_prefix?: SingleKeyDictionary<Field, MatchPhrasePrefixQuery>
226+
/**
227+
* Returns documents that are "like" a given set of documents.
228+
* @doc_id query-dsl-mlt-query
229+
*/
181230
more_like_this?: MoreLikeThisQuery
231+
/**
232+
* Enables you to search for a provided text, number, date or boolean value across multiple fields.
233+
* The provided text is analyzed before matching.
234+
* @doc_id query-dsl-multi-match-query
235+
*/
182236
multi_match?: MultiMatchQuery
237+
/**
238+
* Wraps another query to search nested fields.
239+
* If an object matches the search, the nested query returns the root parent document.
240+
* @doc_id query-dsl-nested-query
241+
*/
183242
nested?: NestedQuery
243+
/**
244+
* Returns child documents joined to a specific parent document.
245+
* @doc_id query-dsl-parent-id-query
246+
*/
184247
parent_id?: ParentIdQuery
248+
/**
249+
* Matches queries stored in an index.
250+
* @doc_id query-dsl-percolate-query
251+
*/
185252
percolate?: PercolateQuery
253+
/**
254+
* Promotes selected documents to rank higher than those matching a given query.
255+
* @doc_id query-dsl-pinned-query
256+
*/
186257
pinned?: PinnedQuery
258+
/**
259+
* Returns documents that contain a specific prefix in a provided field.
260+
* @doc_id query-dsl-prefix-query
261+
*/
187262
prefix?: SingleKeyDictionary<Field, PrefixQuery>
263+
/**
264+
* Returns documents based on a provided query string, using a parser with a strict syntax.
265+
* @doc_id query-dsl-query-string-query
266+
*/
188267
query_string?: QueryStringQuery
189268
range?: SingleKeyDictionary<Field, RangeQuery>
190269
rank_feature?: RankFeatureQuery

0 commit comments

Comments
 (0)