Skip to content

Commit 3002913

Browse files
committed
restore default recommend specs
1 parent 215c701 commit 3002913

File tree

2 files changed

+37
-38
lines changed

2 files changed

+37
-38
lines changed

recommend_spec.yml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,18 @@
11
openapi: 3.0.0
22
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.
55
version: 0.1.0
66
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
2311
paths:
24-
/1/indexes/*/queries:
12+
/1/indexes/*/recommendations:
2513
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.
3016
parameters:
3117
- in: header
3218
name: X-Algolia-Application-Id
@@ -45,39 +31,49 @@ paths:
4531
schema:
4632
type: array
4733
items:
48-
title: multipleQueries
4934
type: object
5035
properties:
5136
indexName:
5237
type: string
5338
example: products
54-
description: The Algolia index name
55-
query:
39+
model:
5640
type: string
57-
description: The query to search for
58-
type:
41+
enum: [related-products, bought-together]
42+
objectID:
5943
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:
6756
type: object
6857
additionalProperties: true
6958
description: A key-value mapping of additional search parameters
7059
example:
7160
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'
7267
required:
7368
- indexName
69+
- model
70+
- objectID
7471
responses:
7572
'200':
7673
description: OK
7774
content:
7875
application/json:
7976
schema:
80-
title: multipleQueriesResponse
8177
type: object
8278
properties:
8379
results:
@@ -94,6 +90,11 @@ paths:
9490
objectID:
9591
type: string
9692
example: objectID1
93+
_score:
94+
type: number
95+
minimum: 0
96+
maximum: 1
97+
example: 0.41
9798
nbHits:
9899
type: integer
99100
queryID:

recommend_spec_2.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ paths:
3131
schema:
3232
type: array
3333
items:
34-
title: getRecommendationsRequest
3534
type: object
3635
properties:
3736
indexName:
@@ -81,7 +80,6 @@ paths:
8180
content:
8281
application/json:
8382
schema:
84-
title: getRecommendationsResponse
8583
type: object
8684
properties:
8785
results:

0 commit comments

Comments
 (0)