-
Notifications
You must be signed in to change notification settings - Fork 10
/
QuerySuggestionsConfiguration.yml
184 lines (167 loc) 路 4.89 KB
/
QuerySuggestionsConfiguration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
QuerySuggestionsConfigurationWithIndex:
type: object
description: Query Suggestions configuration.
required:
- indexName
- sourceIndices
allOf:
- type: object
properties:
indexName:
$ref: './QuerySuggestionsIndexName.yml'
- $ref: '#/QuerySuggestionsConfiguration'
QuerySuggestionsConfiguration:
type: object
description: Query Suggestions configuration.
required:
- sourceIndices
properties:
sourceIndices:
type: array
description: Algolia indices from which to get the popular searches for query suggestions.
minItems: 1
items:
$ref: '#/SourceIndex'
languages:
$ref: '#/Languages'
exclude:
$ref: '#/Exclude'
enablePersonalization:
type: boolean
default: false
description: Whether to turn on personalized query suggestions.
allowSpecialCharacters:
type: boolean
default: false
description: Whether to include suggestions with special characters.
Exclude:
title: exclude
description: Words or regular expressions to exclude from the suggestions.
default: null
oneOf:
- type: array
items:
type: string
- type: 'null'
Languages:
title: languages
description: |
Languages for deduplicating singular and plural suggestions.
If specified, only the more popular form is included.
default: false
oneOf:
- type: array
description: Languages for which to deduplicate singular and plural forms.
items:
type: string
description: Two-letter country code.
- type: boolean
description: If true, deduplication is enabled for all languages.
SourceIndex:
type: object
description: Configuration of an Algolia index for Query Suggestions.
required:
- indexName
properties:
indexName:
type: string
description: Name of the Algolia index to use as source for query suggestions.
example: products
replicas:
type: boolean
default: false
description: |
If true, Query Suggestions uses all replica indices to find popular searches.
If false, only the primary index is used.
example: false
analyticsTags:
$ref: '#/AnalyticsTags'
facets:
$ref: '#/Facets'
minHits:
type: integer
minimum: 0
default: 5
description: |
Minimum number of hits required to be included as a suggestion.
A search query must at least generate `minHits` search results to be included in the Query Suggestions index.
minLetters:
type: integer
minimum: 0
default: 4
description: |
Minimum letters required to be included as a suggestion.
A search query must be at least `minLetters` long to be included in the Query Suggestions index.
generate:
$ref: '#/Generate'
external:
$ref: '#/External'
AnalyticsTags:
title: analyticsTags
description: |
Analytics tags for filtering the popular searches.
For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
default: null
oneOf:
- type: array
items:
type: string
- type: 'null'
Facets:
title: facets
description: |
Facets to use as top categories with your suggestions.
If provided, Query Suggestions adds the top facet values to each suggestion.
default: null
oneOf:
- type: array
items:
$ref: '#/Facet'
- type: 'null'
example:
- attribute: category
amount: 3
- attribute: brand
amount: 2
Facet:
type: object
description: Facet to use as category.
properties:
attribute:
type: string
description: Facet name.
amount:
type: integer
description: Number of suggestions.
Generate:
title: generate
description: |
Facets used for generating query suggestions from facet values.
For example, if you set `generate: ["color", "brand"]`, combinations from the facet values are added as query suggestions,
such as "blue adidas", "red adidas", "blue nike", "red nike", etc.
You can include nested lists.
default: null
oneOf:
- type: array
items:
type: array
items:
type: string
- type: 'null'
example:
- [color, brand]
External:
description: |
Algolia indices with popular searches to use as query suggestions.
Records of these indices must have these attributes:
- `query`: search query which will be added as a suggestion
- `count`: measure of popularity of that search query
For example, you can export popular searches from an external analytics provider, such as Google Analytics or Adobe Analytics,
and feed this data into an Algolia index.
You can use this index to generate query suggestions until your Algolia Analytics has collected enough data.
default: null
oneOf:
- type: array
items:
type: string
- type: 'null'