feat(specs): add /semanticSearch/settings endpoint to Search API spec - #6569
feat(specs): add /semanticSearch/settings endpoint to Search API spec#6569zacharynickerson wants to merge 13 commits into
Conversation
✔️ Code generated!
📊 Benchmark resultsBenchmarks performed on the method using a mock server, the results might not reflect the real-world performance.
|
|
Hey — flagging a CI issue here. The failing checks (csharp, go, java, php, python, ruby) are all failing on the Our changes (new |
Fluf22
left a comment
There was a problem hiding this comment.
Sorry for the latency in reviewing your PR, @zacharynickerson
Wanted to double check a few things
| usePositionalSemanticRanking: | ||
| type: boolean | ||
| default: false | ||
| description: | | ||
| When `true`, vector results are ranked using Algolia's standard tie-breaking algorithm rather than cosine similarity alone. | ||
| Enables custom ranking attributes, optional filters, and geo distance for semantic results. |
There was a problem hiding this comment.
I'm not sure to see this prop equivalent in the related repo
There's no top-level usePositionalSemanticRanking, but it has vectorTiebreaks (L65) and neuralHashScanRatio (L66).
| usePositionalSemanticRanking: | |
| type: boolean | |
| default: false | |
| description: | | |
| When `true`, vector results are ranked using Algolia's standard tie-breaking algorithm rather than cosine similarity alone. | |
| Enables custom ranking attributes, optional filters, and geo distance for semantic results. | |
| vectorTiebreaks: | |
| $ref: '#/VectorTiebreaks' | |
| neuralHashScanRatio: | |
| type: number | |
| format: float | |
| minimum: 0 | |
| exclusiveMinimum: true | |
| maximum: 1 | |
| description: | | |
| Fraction of the neural-hash vector index scanned when retrieving semantic results. | |
| Must be greater than `0` and at most `1`. |
With another file for the VectorTiebreaks definition:
VectorTiebreaks:
type: object
description: Controls vector tie-breaking behavior at query time for semantic (vector) results.
properties:
enable:
type: boolean
description: Whether to apply vector tie-breaking to semantic results.
usePositionalSemanticRanking:
type: boolean
default: false
description: |
When `true`, vector results are ranked using Algolia's standard tie-breaking algorithm rather than cosine similarity alone.
Enables custom ranking attributes, optional filters, and geo distance for semantic results.| type: number | ||
| format: float | ||
| minimum: 0.0001 | ||
| maximum: 0.999 |
There was a problem hiding this comment.
The API rejects only > 1, so the real inclusive max is 1.0; 0.999 is wrongly restrictive.
| maximum: 0.999 | |
| maximum: 1 |
| brand: 0.587878 | ||
| category: 0.683043 | ||
| description: 0.39828 | ||
| name: 1 |
There was a problem hiding this comment.
Since this is a float
| name: 1 | |
| name: 1.0 |
| enum: [all, query, build, error] | ||
| default: all | ||
|
|
||
| neuralSearchMode: |
There was a problem hiding this comment.
Should we set a default?
It's not used in the API clients, but it can help for documentation
Summary
Adds the NeuralSearch Semantic Settings API to the Search API spec.
GET /1/indexes/{indexName}/semanticSearch/settingsPUT /1/indexes/{indexName}/semanticSearch/settingsSemanticSearchSettingsandDynamicThresholdParameters
neuralSearchModestringactive,preview, orinactiveeventSourcesstring[]neuralExpressionobjectvectorModelIdstringneuralSearchPresetstringconservative,expanded_reach,append_only,default, orcustomsemanticBlendWeightfloatcustompreset only)minHitsForSemanticintegercustompreset only)enableNeuralSearchSortBybooleancustompreset only)dynamicThresholdobjectusePositionalSemanticRankingbooleanContext
This endpoint was previously documented as a standalone guide page in
algolia/docs-new. Per feedback from Kai Welke, the API reference is the right home for this — the guide page has been removed and will link to this reference once merged.🤖 Generated with Claude Code