Skip to content

Commit 13e7d17

Browse files
authored
feat(specs): add neuralSearch options (#1474)
1 parent e195668 commit 13e7d17

File tree

5 files changed

+86
-3
lines changed

5 files changed

+86
-3
lines changed

.github/.cache_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.21
1+
0.0.22

specs/abtesting/paths/abtests.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ get:
5959
parameters:
6060
- $ref: '../../common/parameters.yml#/Offset'
6161
- $ref: '../../common/parameters.yml#/Limit'
62+
- name: indexPrefix
63+
in: query
64+
description: Filters the returned ab tests by any indices starting with the provided prefix that are assigned to either variant of an ab test.
65+
schema:
66+
type: string
67+
- name: indexSuffix
68+
in: query
69+
description: Filters the returned ab tests by any indices ending with the provided suffix that are assigned to either variant of an ab test.
70+
schema:
71+
type: string
6272
responses:
6373
'200':
6474
description: OK

specs/common/schemas/IndexSettings.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,21 @@ indexSettingsAsSearchParams:
280280
$ref: '#/queryType'
281281
removeWordsIfNoResults:
282282
$ref: '#/removeWordsIfNoResults'
283+
mode:
284+
$ref: '#/mode'
285+
semanticSearch:
286+
type: object
287+
description: >
288+
The settings relevant for configuration of the semantic search engine.
289+
These settings are only used when the mode is set to 'neuralSearch'.
290+
properties:
291+
eventSources:
292+
description: When null, the current index / replica group will be used as the event source.
293+
nullable: true
294+
type: array
295+
items:
296+
type: string
297+
283298
advancedSyntax:
284299
type: boolean
285300
description: Enables the advanced query syntax.
@@ -320,6 +335,14 @@ indexSettingsAsSearchParams:
320335
default: [exactPhrase, excludeWords]
321336
x-categories:
322337
- Query strategy
338+
explain:
339+
type: array
340+
items:
341+
type: string
342+
description: Enriches the API’s response with meta-information as to how the query was processed.
343+
default: []
344+
x-categories:
345+
- Query strategy
323346
distinct:
324347
$ref: '#/distinct'
325348
attributeForDistinct:
@@ -394,6 +417,14 @@ queryType:
394417
x-categories:
395418
- Query strategy
396419

420+
mode:
421+
type: string
422+
enum: ['neuralSearch', 'keywordSearch']
423+
description: The search mode that the index will use to query for results.
424+
default: keywordSearch
425+
x-categories:
426+
- Query strategy
427+
397428
removeWordsIfNoResults:
398429
type: string
399430
enum: [none, lastWords, firstWords, allOptional]

specs/search/common/schemas/SearchResponse.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ baseSearchResponse:
108108
type: string
109109
description: A url-encoded string of all search parameters.
110110
example: query=a&hitsPerPage=20
111+
redirect:
112+
type: object
113+
description: This parameter is for internal use only.
114+
properties:
115+
index:
116+
type: array
117+
items:
118+
$ref: '#/RedirectRuleIndexMetadata'
111119
parsedQuery:
112120
type: string
113121
description: The query string that will be searched, after normalization.
@@ -137,3 +145,33 @@ nbPages:
137145
type: integer
138146
description: Number of pages available for the current query.
139147
example: 1
148+
149+
RedirectRuleIndexMetadata:
150+
type: object
151+
properties:
152+
source:
153+
type: string
154+
description: Source index for the redirect rule.
155+
dest:
156+
type: string
157+
description: Destination index for the redirect rule.
158+
reason:
159+
type: string
160+
description: Reason for the redirect rule.
161+
succeed:
162+
type: boolean
163+
description: Status for the redirect rule.
164+
data:
165+
type: object
166+
description: Data for the redirect rule.
167+
required:
168+
- ruleObjectID
169+
properties:
170+
ruleObjectID:
171+
type: string
172+
required:
173+
- data
174+
- succeed
175+
- reason
176+
- dest
177+
- source

tests/CTS/methods/requests/abtesting/listABTests.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111
"testName": "listABTests with parameters",
1212
"parameters": {
1313
"offset": 42,
14-
"limit": 21
14+
"limit": 21,
15+
"indexPrefix": "foo",
16+
"indexSuffix": "bar"
1517
},
1618
"request": {
1719
"path": "/2/abtests",
1820
"method": "GET",
1921
"queryParameters": {
2022
"offset": "42",
21-
"limit": "21"
23+
"limit": "21",
24+
"indexPrefix": "foo",
25+
"indexSuffix": "bar"
2226
}
2327
}
2428
}

0 commit comments

Comments
 (0)