-
Notifications
You must be signed in to change notification settings - Fork 27
feat(specs): add recommend batch rules endpoint #3782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9f4d3c2
feat(specs): add recommend batch rules endpoint
raed667 f16f111
fix
raed667 eab3c70
Merge branch 'main' into feat-add-recommend-batch-rules
raed667 2c84306
add test
raed667 3228d79
fix test
raed667 293c0fc
fix test
raed667 ce6feb3
duplicate timeRange
raed667 4431f99
add the duplicate
millotp 430f658
lowercase
millotp 4e07197
Merge branch 'main' into feat-add-recommend-batch-rules
raed667 b6158fd
use RecommendUpdatedAt
raed667 ca2abf3
Merge branch 'main' into feat-add-recommend-batch-rules
raed667 b4ab7ab
remove duplicate
millotp e1fcf7d
Merge branch 'main' into feat-add-recommend-batch-rules
shortcuts 7d42f58
chore: remove optional properties
shortcuts 9c83681
Merge branch 'main' into feat-add-recommend-batch-rules
shortcuts 14d2f9b
Merge branch 'main' into feat-add-recommend-batch-rules
shortcuts File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| post: | ||
| tags: | ||
| - rules | ||
| operationId: batchRecommendRules | ||
| x-use-read-transporter: false | ||
| x-cacheable: false | ||
| x-acl: | ||
| - editSettings | ||
| summary: Create or update a batch of Recommend Rules | ||
| description: | | ||
| Create or update a batch of Recommend Rules | ||
|
|
||
| Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. | ||
| You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. | ||
|
|
||
| Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: | ||
| - Conditions `pattern` and `anchoring` are unavailable. | ||
| - Condition `filters` triggers if the source item matches the specified filters. | ||
| - Condition `filters` accepts numeric filters. | ||
| - Consequence `params` only covers filtering parameters. | ||
| - Consequence `automaticFacetFilters` doesn't require a facet value placeholder (it tries to match the data source item's attributes instead). | ||
| parameters: | ||
| - $ref: '../../common/parameters.yml#/IndexName' | ||
| - $ref: '../common/parameters.yml#/Models' | ||
| requestBody: | ||
| content: | ||
| application/json: | ||
| schema: | ||
| title: rules | ||
| type: array | ||
| description: Recommend rules. | ||
| additionalProperties: false | ||
| items: | ||
| $ref: '../common/schemas/RecommendRule.yml#/RecommendRule' | ||
|
|
||
| responses: | ||
| '200': | ||
| $ref: '../../common/responses/UpdatedAt.yml' | ||
raed667 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| '400': | ||
| $ref: '../../common/responses/BadRequest.yml' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| [ | ||
| { | ||
| "testName": "batch recommend rules", | ||
| "parameters": { | ||
| "indexName": "indexName", | ||
| "model": "related-products" | ||
| }, | ||
| "request": { | ||
| "path": "/1/indexes/indexName/related-products/recommend/rules/batch", | ||
| "method": "POST", | ||
| "body": {} | ||
| } | ||
| } | ||
| ] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.