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