|
1
|
/** |
|
2
|
* @schema SearchOptions |
|
3
|
* type: object |
|
4
|
* description: The options changing how a search query is matched, scored, and aggregated. |
|
5
|
* x-schemaName: SearchOptions |
|
6
|
* properties: |
|
7
|
* attributes_to_search_on: |
|
8
|
* type: array |
|
9
|
* description: The dotted paths of the fields to match the free-text query against. It defaults to every field marked `searchable` on the index. |
|
10
|
* items: |
|
11
|
* type: string |
|
12
|
* title: attributes_to_search_on |
|
13
|
* description: A field's dotted path. |
|
14
|
* match_strategy: |
|
15
|
* type: string |
|
16
|
* description: |- |
|
17
|
* How query terms combine. |
|
18
|
* |
|
19
|
* - `"all"` (default): every term must appear as a complete token. |
|
20
|
* - `"any"`: at least one term must match. |
|
21
|
* - `"last"`: typeahead. Completed terms must match in full; the last term |
|
22
|
* is a prefix, so `"my sear"` matches `"My search results"`. |
|
23
|
* enum: |
|
24
|
* - any |
|
25
|
* - all |
|
26
|
* - last |
|
27
|
* typo_tolerance: |
|
28
|
* type: boolean |
|
29
|
* title: typo_tolerance |
|
30
|
* description: Whether to match terms that are misspelled by a character or two. It's ignored unless the query includes a free-text `q` and the searched fields have typo tolerance enabled in the index's settings. |
|
31
|
* facets: |
|
32
|
* type: array |
|
33
|
* description: The facets to compute alongside the hits. A string is shorthand for a `value` facet on that field. |
|
34
|
* items: |
|
35
|
* oneOf: |
|
36
|
* - type: string |
|
37
|
* title: facets |
|
38
|
* description: A facet to compute alongside the hits. |
|
39
|
* - type: object |
|
40
|
* description: A facet to compute alongside the hits. |
|
41
|
* required: |
|
42
|
* - field |
|
43
|
* properties: |
|
44
|
* field: |
|
45
|
* type: string |
|
46
|
* title: field |
|
47
|
* description: The dotted path of the field to facet on. |
|
48
|
* type: |
|
49
|
* type: string |
|
50
|
* description: |- |
|
51
|
* Count the documents per distinct value of the field. This is the default |
|
52
|
* facet type. |
|
53
|
* enum: |
|
54
|
* - value |
|
55
|
* limit: |
|
56
|
* type: number |
|
57
|
* title: limit |
|
58
|
* description: The maximum number of facet values to return. |
|
59
|
* sort: |
|
60
|
* type: string |
|
61
|
* description: Whether to order the returned values by their count or alphabetically. |
|
62
|
* enum: |
|
63
|
* - count |
|
64
|
* - alpha |
|
65
|
* query: |
|
66
|
* type: string |
|
67
|
* title: query |
|
68
|
* description: Restrict the returned facet values to those matching this string. |
|
69
|
* - type: object |
|
70
|
* description: A facet to compute alongside the hits. |
|
71
|
* required: |
|
72
|
* - field |
|
73
|
* - type |
|
74
|
* properties: |
|
75
|
* field: |
|
76
|
* type: string |
|
77
|
* title: field |
|
78
|
* description: The dotted path of the field to facet on. |
|
79
|
* type: |
|
80
|
* type: string |
|
81
|
* title: type |
|
82
|
* description: Count the documents falling in each of the requested `ranges`. |
|
83
|
* ranges: |
|
84
|
* type: array |
|
85
|
* description: The ranges to count the documents of. |
|
86
|
* items: |
|
87
|
* type: object |
|
88
|
* description: A range to count the documents of. |
|
89
|
* properties: |
|
90
|
* key: |
|
91
|
* type: string |
|
92
|
* title: key |
|
93
|
* description: A key identifying the range in the result. |
|
94
|
* from: |
|
95
|
* oneOf: |
|
96
|
* - type: string |
|
97
|
* title: from |
|
98
|
* description: The range's inclusive lower bound. |
|
99
|
* - type: number |
|
100
|
* title: from |
|
101
|
* description: The range's inclusive lower bound. |
|
102
|
* to: |
|
103
|
* oneOf: |
|
104
|
* - type: string |
|
105
|
* title: to |
|
106
|
* description: The range's exclusive upper bound. |
|
107
|
* - type: number |
|
108
|
* title: to |
|
109
|
* description: The range's exclusive upper bound. |
|
110
|
* - type: object |
|
111
|
* description: A facet to compute alongside the hits. |
|
112
|
* required: |
|
113
|
* - field |
|
114
|
* - type |
|
115
|
* properties: |
|
116
|
* field: |
|
117
|
* type: string |
|
118
|
* title: field |
|
119
|
* description: The dotted path of the field to facet on. |
|
120
|
* type: |
|
121
|
* type: string |
|
122
|
* title: type |
|
123
|
* description: |- |
|
124
|
* Aggregate the field's values, such as its minimum and maximum, over the |
|
125
|
* matching documents. |
|
126
|
* disjunctive_facets: |
|
127
|
* type: boolean |
|
128
|
* title: disjunctive_facets |
|
129
|
* description: Whether to compute each facet ignoring the filter on that same field, so a storefront keeps showing sibling values of an active filter. |
|
130
|
* highlight: |
|
131
|
* oneOf: |
|
132
|
* - type: boolean |
|
133
|
* title: highlight |
|
134
|
* description: Whether to highlight the matched terms in every field the query searches on. It's applied only when the query includes a free-text `q`. |
|
135
|
* - $ref: "#/components/schemas/SearchHighlightOptions" |
|
136
|
* distinct: |
|
137
|
* type: string |
|
138
|
* title: distinct |
|
139
|
* description: Return at most one hit per distinct value of this field. |
|
140
|
* min_score: |
|
141
|
* type: number |
|
142
|
* title: min_score |
|
143
|
* description: Discard the hits scoring below this threshold. |
|
144
|
* include_score: |
|
145
|
* type: boolean |
|
146
|
* title: include_score |
|
147
|
* description: Whether to return each hit's relevance score. |
|
148
|
* locales: |
|
149
|
* type: array |
|
150
|
* description: A query-time language hint, such as `["en"]`, for engines that analyze per language. A provider that can't honor it rejects the query rather than silently matching differently. |
|
151
|
* items: |
|
152
|
* type: string |
|
153
|
* title: locales |
|
154
|
* description: A locale in BCP 47 format. |
|
155
|
* vector: |
|
156
|
* $ref: "#/components/schemas/SearchVectorOptions" |
|
157
|
* count: |
|
158
|
* type: string |
|
159
|
* description: |- |
|
160
|
* How the total number of matching documents is computed. `"exact"` may be |
|
161
|
* rejected or slow depending on the provider. |
|
162
|
* enum: |
|
163
|
* - estimated |
|
164
|
* - exact |
|
165
|
* - none |
|
166
|
* |
|
167
|
*/ |
|
168
|
|