Skip to content

Commit b62ddd0

Browse files
robertkleeRobert Lee
andauthored
[Search] 2023-10-01-preview API Review feedback fixes - update swagger to reflect api renaming (#25944)
* update swagger to reflect api renaming * missed vectorIndexSize * update examples * update samples * samples * ditto * ditto * sampls * update samples * samples * add "format": "uri" * changes in response to SDK team feedback --------- Co-authored-by: Robert Lee <[email protected]>
1 parent 3066a97 commit b62ddd0

File tree

6 files changed

+631
-44
lines changed

6 files changed

+631
-44
lines changed

specification/search/data-plane/Azure.Search/preview/2023-10-01-Preview/examples/SearchIndexSearchDocumentsPost.json

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,40 @@
99
"category,count:10,sort:count"
1010
],
1111
"filter": "rating gt 4.0",
12-
"highlight": "title",
12+
"highlight": "description",
1313
"highlightPostTag": "</em>",
1414
"highlightPreTag": "<em>",
1515
"minimumCoverage": null,
16-
"orderby": "search.score() desc,rating desc",
16+
"orderby": "rating desc",
1717
"queryType": "simple",
1818
"scoringParameters": [
1919
"currentLocation--122.123,44.77233"
2020
],
2121
"scoringProfile": "sp",
2222
"search": "nice hotels",
23-
"searchFields": "title,description",
23+
"searchFields": "category,description",
2424
"searchMode": "any",
2525
"sessionId": "mysessionid",
2626
"scoringStatistics": "global",
27-
"select": "docId,title,description",
27+
"select": "hotelId,description",
2828
"skip": 0,
29-
"top": 10
29+
"top": 10,
30+
"vectorQueries": [
31+
{
32+
"kind": "vector",
33+
"vector": [
34+
0.103,
35+
0.0712,
36+
0.0852,
37+
0.1547,
38+
0.1183
39+
],
40+
"fields": "descriptionEmbedding",
41+
"k": 5,
42+
"exhaustive": true
43+
}
44+
],
45+
"vectorFilterMode": "preFilter"
3046
}
3147
},
3248
"responses": {

specification/search/data-plane/Azure.Search/preview/2023-10-01-Preview/examples/SearchServiceCreateIndex.json

Lines changed: 149 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@
2222
"sortable": false,
2323
"facetable": false
2424
},
25+
{
26+
"name": "descriptionEmbedding",
27+
"type": "Collection(Edm.Single)",
28+
"searchable": true,
29+
"filterable": false,
30+
"retrievable": true,
31+
"sortable": false,
32+
"facetable": false,
33+
"key": false,
34+
"indexAnalyzer": null,
35+
"searchAnalyzer": null,
36+
"analyzer": null,
37+
"synonymMaps": [],
38+
"dimensions": 1536,
39+
"vectorSearchProfile": "myHnswProfile"
40+
},
2541
{
2642
"name": "description_fr",
2743
"type": "Edm.String",
@@ -153,6 +169,40 @@
153169
}
154170
}
155171
]
172+
},
173+
"vectorSearch": {
174+
"profiles": [
175+
{
176+
"name": "myHnswProfile",
177+
"algorithm": "myHnsw",
178+
"vectorizer": "myOpenAi"
179+
},
180+
{
181+
"name": "myAlgorithm",
182+
"algorithm": "myHnsw"
183+
}
184+
],
185+
"algorithms": [
186+
{
187+
"name": "myHnsw",
188+
"kind": "hnsw",
189+
"hnswParameters": {
190+
"m": 4,
191+
"metric": "cosine"
192+
}
193+
}
194+
],
195+
"vectorizers": [
196+
{
197+
"name": "myOpenAi",
198+
"kind": "azureOpenAI",
199+
"azureOpenAIParameters": {
200+
"resourceUri": "https://url.openai.azure.com",
201+
"deploymentId": "text-embedding-ada-002",
202+
"apiKey": "topsecretkey"
203+
}
204+
}
205+
]
156206
}
157207
}
158208
},
@@ -173,6 +223,9 @@
173223
"indexAnalyzer": null,
174224
"searchAnalyzer": null,
175225
"analyzer": null,
226+
"normalizer": null,
227+
"dimensions": null,
228+
"vectorSearchProfile": null,
176229
"synonymMaps": []
177230
},
178231
{
@@ -187,6 +240,9 @@
187240
"indexAnalyzer": null,
188241
"searchAnalyzer": null,
189242
"analyzer": null,
243+
"normalizer": null,
244+
"dimensions": null,
245+
"vectorSearchProfile": null,
190246
"synonymMaps": []
191247
},
192248
{
@@ -201,6 +257,26 @@
201257
"indexAnalyzer": null,
202258
"searchAnalyzer": null,
203259
"analyzer": null,
260+
"normalizer": null,
261+
"dimensions": null,
262+
"vectorSearchProfile": null,
263+
"synonymMaps": []
264+
},
265+
{
266+
"name": "descriptionEmbedding",
267+
"type": "Collection(Edm.Single)",
268+
"searchable": true,
269+
"filterable": false,
270+
"retrievable": true,
271+
"sortable": false,
272+
"facetable": false,
273+
"key": false,
274+
"indexAnalyzer": null,
275+
"searchAnalyzer": null,
276+
"analyzer": null,
277+
"normalizer": null,
278+
"dimensions": 1536,
279+
"vectorSearchProfile": "myHnswProfile",
204280
"synonymMaps": []
205281
},
206282
{
@@ -215,6 +291,9 @@
215291
"indexAnalyzer": null,
216292
"searchAnalyzer": null,
217293
"analyzer": "fr.lucene",
294+
"normalizer": null,
295+
"dimensions": null,
296+
"vectorSearchProfile": null,
218297
"synonymMaps": []
219298
},
220299
{
@@ -229,6 +308,9 @@
229308
"indexAnalyzer": null,
230309
"searchAnalyzer": null,
231310
"analyzer": null,
311+
"normalizer": null,
312+
"dimensions": null,
313+
"vectorSearchProfile": null,
232314
"synonymMaps": []
233315
},
234316
{
@@ -243,6 +325,9 @@
243325
"indexAnalyzer": null,
244326
"searchAnalyzer": null,
245327
"analyzer": null,
328+
"normalizer": null,
329+
"dimensions": null,
330+
"vectorSearchProfile": null,
246331
"synonymMaps": []
247332
},
248333
{
@@ -257,6 +342,9 @@
257342
"indexAnalyzer": null,
258343
"searchAnalyzer": null,
259344
"analyzer": "tagsAnalyzer",
345+
"normalizer": null,
346+
"dimensions": null,
347+
"vectorSearchProfile": null,
260348
"synonymMaps": []
261349
},
262350
{
@@ -271,6 +359,9 @@
271359
"indexAnalyzer": null,
272360
"searchAnalyzer": null,
273361
"analyzer": null,
362+
"normalizer": null,
363+
"dimensions": null,
364+
"vectorSearchProfile": null,
274365
"synonymMaps": []
275366
},
276367
{
@@ -285,6 +376,9 @@
285376
"indexAnalyzer": null,
286377
"searchAnalyzer": null,
287378
"analyzer": null,
379+
"normalizer": null,
380+
"dimensions": null,
381+
"vectorSearchProfile": null,
288382
"synonymMaps": []
289383
},
290384
{
@@ -299,6 +393,9 @@
299393
"indexAnalyzer": null,
300394
"searchAnalyzer": null,
301395
"analyzer": null,
396+
"normalizer": null,
397+
"dimensions": null,
398+
"vectorSearchProfile": null,
302399
"synonymMaps": []
303400
},
304401
{
@@ -313,6 +410,9 @@
313410
"indexAnalyzer": null,
314411
"searchAnalyzer": null,
315412
"analyzer": null,
413+
"normalizer": null,
414+
"dimensions": null,
415+
"vectorSearchProfile": null,
316416
"synonymMaps": []
317417
},
318418
{
@@ -327,26 +427,30 @@
327427
"indexAnalyzer": null,
328428
"searchAnalyzer": null,
329429
"analyzer": null,
430+
"normalizer": null,
431+
"dimensions": null,
432+
"vectorSearchProfile": null,
330433
"synonymMaps": []
331434
}
332435
],
333436
"scoringProfiles": [
334437
{
335438
"name": "geo",
439+
"functionAggregation": "sum",
336440
"text": {
337441
"weights": {
338-
"hotelName": 5
442+
"hotelName": 5.0
339443
}
340444
},
341445
"functions": [
342446
{
343-
"type": "distance",
344-
"boost": 5,
345447
"fieldName": "location",
346448
"interpolation": "logarithmic",
449+
"type": "distance",
450+
"boost": 5.0,
347451
"distance": {
348452
"referencePointParameter": "currentLocation",
349-
"boostingDistance": 10
453+
"boostingDistance": 10.0
350454
}
351455
}
352456
]
@@ -369,10 +473,12 @@
369473
"charFilters": [
370474
"html_strip"
371475
],
372-
"tokenizer": "standard_v2"
476+
"tokenizer": "standard_v2",
477+
"tokenFilters": []
373478
}
374479
],
375480
"tokenizers": [],
481+
"normalizers": [],
376482
"tokenFilters": [],
377483
"charFilters": [],
378484
"corsOptions": {
@@ -396,6 +502,7 @@
396502
"k1": 1.3
397503
},
398504
"semantic": {
505+
"defaultConfiguration": null,
399506
"configurations": [
400507
{
401508
"name": "semanticHotels",
@@ -422,6 +529,43 @@
422529
}
423530
}
424531
]
532+
},
533+
"vectorSearch": {
534+
"algorithms": [
535+
{
536+
"name": "myHnsw",
537+
"kind": "hnsw",
538+
"hnswParameters": {
539+
"metric": "cosine",
540+
"m": 4,
541+
"efConstruction": 400,
542+
"efSearch": 500
543+
}
544+
}
545+
],
546+
"profiles": [
547+
{
548+
"name": "myHnswProfile",
549+
"algorithm": "myHnsw",
550+
"vectorizer": "myOpenAi"
551+
},
552+
{
553+
"name": "myAlgorithm",
554+
"algorithm": "myHnsw"
555+
}
556+
],
557+
"vectorizers": [
558+
{
559+
"name": "myOpenAi",
560+
"kind": "azureOpenAI",
561+
"azureOpenAIParameters": {
562+
"resourceUri": "https://url.openai.azure.com",
563+
"deploymentId": "text-embedding-ada-002",
564+
"apiKey": "topsecretkey",
565+
"authIdentity": null
566+
}
567+
}
568+
]
425569
}
426570
}
427571
}

0 commit comments

Comments
 (0)