1
1
openapi : 3.0.0
2
2
info :
3
- title : Search API
4
- description : API powering the Search feature of Algolia.
3
+ title : Recommend API
4
+ description : API powering the Recommend feature of Algolia.
5
5
version : 0.1.0
6
6
servers :
7
- - url : https://{appId}-1.algolianet.com
8
- variables :
9
- appId :
10
- default : test
11
- - url : https://{appId}-2.algolianet.com
12
- variables :
13
- appId :
14
- default : test
15
- - url : https://{appId}-3.algolianet.com
16
- variables :
17
- appId :
18
- default : test
19
- - url : https://{appId}-dsn.algolianet.com
20
- variables :
21
- appId :
22
- default : test
7
+ - url : https://{appid}-1.algolianet.com
8
+ - url : https://{appid}-2.algolianet.com
9
+ - url : https://{appid}-3.algolianet.com
10
+ - url : https://{appid}-dsn.algolianet.com
23
11
paths :
24
- /1/indexes/*/queries :
12
+ /1/indexes/*/recommendations :
25
13
post :
26
- tags :
27
- - search
28
- operationId : search
29
- summary : Get search results for the given requests.
14
+ operationId : getRecommendations
15
+ summary : Get recommendations for the given requests.
30
16
parameters :
31
17
- in : header
32
18
name : X-Algolia-Application-Id
@@ -45,39 +31,49 @@ paths:
45
31
schema :
46
32
type : array
47
33
items :
48
- title : multipleQueries
49
34
type : object
50
35
properties :
51
36
indexName :
52
37
type : string
53
38
example : products
54
- description : The Algolia index name
55
- query :
39
+ model :
56
40
type : string
57
- description : The query to search for
58
- type :
41
+ enum : [related-products, bought-together]
42
+ objectID :
59
43
type : string
60
- enum : [default, facet]
61
- default : default
62
- description : Perform a search query with `default`, will search for facet values if `facet` is given
63
- facet :
64
- type : string
65
- description : The `facet` name
66
- params :
44
+ threshold :
45
+ type : number
46
+ default : 0
47
+ minimum : 0
48
+ maximum : 1
49
+ maxRecommendations :
50
+ type : number
51
+ default : 0
52
+ example : 5
53
+ minimum : 0
54
+ maximum : 1000
55
+ queryParameters :
67
56
type : object
68
57
additionalProperties : true
69
58
description : A key-value mapping of additional search parameters
70
59
example :
71
60
filters : ' in_stock:true'
61
+ fallbackParameters :
62
+ type : object
63
+ additionalProperties : true
64
+ description : A key-value mapping of additional search parameters
65
+ example :
66
+ filters : ' brand:apple'
72
67
required :
73
68
- indexName
69
+ - model
70
+ - objectID
74
71
responses :
75
72
' 200 ' :
76
73
description : OK
77
74
content :
78
75
application/json :
79
76
schema :
80
- title : multipleQueriesResponse
81
77
type : object
82
78
properties :
83
79
results :
@@ -94,6 +90,11 @@ paths:
94
90
objectID :
95
91
type : string
96
92
example : objectID1
93
+ _score :
94
+ type : number
95
+ minimum : 0
96
+ maximum : 1
97
+ example : 0.41
97
98
nbHits :
98
99
type : integer
99
100
queryID :
0 commit comments