Restructure reference docs directory

This commit is contained in:
Josh Mock
2024-12-02 16:58:55 -06:00
parent 647dac8069
commit c3e7619621
583 changed files with 1186 additions and 1305 deletions

View File

@ -0,0 +1,138 @@
[[reference-search]]
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
[discrete]
[[client.search]]
=== client.search
Run a search. Get search hits that match the query defined in the request. You can provide search queries using the `q` query string parameter or the request body. If both are specified, only the query parameter is used.
{ref}/search-search.html[{es} documentation]
[discrete]
==== Function signature
[source,ts]
----
(SearchRequest, options?): Promise<SearchResponse>
----
[discrete]
==== Request
[pass]
++++
<pre>
++++
interface SearchRequest extends <<RequestBase>> {
index?: <<Indices>>
allow_no_indices?: boolean
allow_partial_search_results?: boolean
analyzer?: string
analyze_wildcard?: boolean
batched_reduce_size?: <<long>>
ccs_minimize_roundtrips?: boolean
default_operator?: <<QueryDslOperator>>
df?: string
expand_wildcards?: <<ExpandWildcards>>
ignore_throttled?: boolean
ignore_unavailable?: boolean
include_named_queries_score?: boolean
lenient?: boolean
max_concurrent_shard_requests?: <<long>>
min_compatible_shard_node?: <<VersionString>>
preference?: string
pre_filter_shard_size?: <<long>>
request_cache?: boolean
routing?: <<Routing>>
scroll?: <<Duration>>
search_type?: <<SearchType>>
suggest_field?: <<Field>>
suggest_mode?: <<SuggestMode>>
suggest_size?: <<long>>
suggest_text?: string
typed_keys?: boolean
rest_total_hits_as_int?: boolean
_source_excludes?: <<Fields>>
_source_includes?: <<Fields>>
q?: string
force_synthetic_source?: boolean
aggregations?: Record<string, <<AggregationsAggregationContainer>>>
pass:[/**] @alias aggregations */
aggs?: Record<string, <<AggregationsAggregationContainer>>>
collapse?: <<SearchFieldCollapse>>
explain?: boolean
ext?: Record<string, any>
from?: <<integer>>
highlight?: <<SearchHighlight>>
track_total_hits?: <<SearchTrackHits>>
indices_boost?: Record<<<IndexName>>, <<double>>>[]
docvalue_fields?: (<<QueryDslFieldAndFormat>> | <<Field>>)[]
knn?: <<KnnSearch>> | <<KnnSearch>>[]
rank?: <<RankContainer>>
min_score?: <<double>>
post_filter?: <<QueryDslQueryContainer>>
profile?: boolean
query?: <<QueryDslQueryContainer>>
rescore?: <<SearchRescore>> | <<SearchRescore>>[]
retriever?: <<RetrieverContainer>>
script_fields?: Record<string, <<ScriptField>>>
search_after?: <<SortResults>>
size?: <<integer>>
slice?: <<SlicedScroll>>
sort?: <<Sort>>
_source?: <<SearchSourceConfig>>
fields?: (<<QueryDslFieldAndFormat>> | <<Field>>)[]
suggest?: <<SearchSuggester>>
terminate_after?: <<long>>
timeout?: string
track_scores?: boolean
version?: boolean
seq_no_primary_term?: boolean
stored_fields?: <<Fields>>
pit?: <<SearchPointInTimeReference>>
runtime_mappings?: <<MappingRuntimeFields>>
stats?: string[]
}
[pass]
++++
</pre>
++++
[discrete]
==== Response
[pass]
++++
<pre>
++++
type SearchResponse<TDocument = unknown, TAggregations = Record<<<AggregateName>>, <<AggregationsAggregate>>>> = <<SearchResponseBody>><TDocument, TAggregations>
[pass]
++++
</pre>
++++