-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(specs): browse response required properties (#3348)
- Loading branch information
Showing
14 changed files
with
250 additions
and
223 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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,212 @@ | ||
baseSearchResponse: | ||
type: object | ||
additionalProperties: true | ||
required: | ||
- processingTimeMS | ||
properties: | ||
abTestID: | ||
type: integer | ||
description: A/B test ID. This is only included in the response for indices that are part of an A/B test. | ||
abTestVariantID: | ||
type: integer | ||
minimum: 1 | ||
description: Variant ID. This is only included in the response for indices that are part of an A/B test. | ||
aroundLatLng: | ||
type: string | ||
description: Computed geographical location. | ||
example: '40.71,-74.01' | ||
pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$ | ||
automaticRadius: | ||
type: string | ||
description: Distance from a central coordinate provided by `aroundLatLng`. | ||
exhaustive: | ||
type: object | ||
title: exhaustive | ||
description: Whether certain properties of the search response are calculated exhaustive (exact) or approximated. | ||
properties: | ||
facetsCount: | ||
type: boolean | ||
title: facetsCount | ||
description: Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-). | ||
facetValues: | ||
type: boolean | ||
title: facetValues | ||
description: The value is `false` if not all facet values are retrieved. | ||
nbHits: | ||
type: boolean | ||
title: nbHits | ||
description: Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query. | ||
rulesMatch: | ||
type: boolean | ||
title: rulesMatch | ||
description: Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large. | ||
typo: | ||
type: boolean | ||
title: typo | ||
description: Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled. | ||
exhaustiveFacetsCount: | ||
type: boolean | ||
description: See the `facetsCount` field of the `exhaustive` object in the response. | ||
deprecated: true | ||
exhaustiveNbHits: | ||
type: boolean | ||
description: See the `nbHits` field of the `exhaustive` object in the response. | ||
deprecated: true | ||
exhaustiveTypo: | ||
type: boolean | ||
description: See the `typo` field of the `exhaustive` object in the response. | ||
deprecated: true | ||
facets: | ||
title: facets | ||
type: object | ||
additionalProperties: | ||
x-additionalPropertiesName: facet | ||
type: object | ||
additionalProperties: | ||
x-additionalPropertiesName: facet count | ||
type: integer | ||
description: Facet counts. | ||
example: | ||
category: | ||
food: 1 | ||
tech: 42 | ||
facets_stats: | ||
title: facetsStats | ||
type: object | ||
description: Statistics for numerical facets. | ||
additionalProperties: | ||
type: object | ||
title: facetStats | ||
properties: | ||
min: | ||
type: number | ||
format: double | ||
description: Minimum value in the results. | ||
max: | ||
type: number | ||
format: double | ||
description: Maximum value in the results. | ||
avg: | ||
type: number | ||
format: double | ||
description: Average facet value in the results. | ||
sum: | ||
type: number | ||
format: double | ||
description: Sum of all values in the results. | ||
index: | ||
type: string | ||
example: indexName | ||
description: Index name used for the query. | ||
indexUsed: | ||
type: string | ||
description: Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query. | ||
example: indexNameAlt | ||
message: | ||
type: string | ||
description: Warnings about the query. | ||
nbSortedHits: | ||
type: integer | ||
description: Number of hits selected and sorted by the relevant sort algorithm. | ||
example: 20 | ||
parsedQuery: | ||
type: string | ||
description: Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched. | ||
example: 'george clo' | ||
processingTimeMS: | ||
$ref: '#/processingTimeMS' | ||
processingTimingsMS: | ||
type: object | ||
description: Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues. | ||
queryAfterRemoval: | ||
type: string | ||
description: Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set. | ||
redirect: | ||
title: redirect | ||
type: object | ||
description: | | ||
[Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only. | ||
properties: | ||
index: | ||
type: array | ||
items: | ||
$ref: '#/RedirectRuleIndexMetadata' | ||
renderingContent: | ||
$ref: './IndexSettings.yml#/renderingContent' | ||
serverTimeMS: | ||
type: integer | ||
description: Time the server took to process the request, in milliseconds. | ||
example: 20 | ||
serverUsed: | ||
type: string | ||
description: Host name of the server that processed the request. | ||
example: 'c2-uk-3.algolia.net' | ||
userData: | ||
$ref: './IndexSettings.yml#/userData' | ||
queryID: | ||
type: string | ||
description: Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/). | ||
example: 'a00dbc80a8d13c4565a442e7e2dca80a' | ||
|
||
nbHits: | ||
type: integer | ||
description: Number of results (hits). | ||
example: 20 | ||
|
||
nbPages: | ||
type: integer | ||
description: Number of pages of results. | ||
example: 1 | ||
|
||
processingTimeMS: | ||
type: integer | ||
description: Time the server took to process the request, in milliseconds. | ||
example: 20 | ||
|
||
RedirectRuleIndexMetadata: | ||
type: object | ||
properties: | ||
source: | ||
type: string | ||
description: Source index for the redirect rule. | ||
dest: | ||
type: string | ||
description: Destination index for the redirect rule. | ||
reason: | ||
type: string | ||
description: Reason for the redirect rule. | ||
succeed: | ||
type: boolean | ||
description: Redirect rule status. | ||
data: | ||
type: object | ||
description: Redirect rule data. | ||
required: | ||
- ruleObjectID | ||
properties: | ||
ruleObjectID: | ||
type: string | ||
required: | ||
- data | ||
- succeed | ||
- reason | ||
- dest | ||
- source | ||
|
||
SearchPagination: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
page: | ||
$ref: './SearchParams.yml#/page' | ||
nbHits: | ||
$ref: '#/nbHits' | ||
nbPages: | ||
$ref: '#/nbPages' | ||
hitsPerPage: | ||
$ref: './IndexSettings.yml#/hitsPerPage' | ||
required: | ||
- page | ||
- nbHits | ||
- nbPages | ||
- hitsPerPage |
This file contains 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 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 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 |
---|---|---|
@@ -1,5 +1,19 @@ | ||
browseResponse: | ||
allOf: | ||
- $ref: './SearchResponse.yml#/baseSearchResponse' | ||
- $ref: '../../../common/schemas/SearchResponse.yml#/baseSearchResponse' | ||
- $ref: '#/BrowsePagination' | ||
- $ref: './SearchResponse.yml#/searchHits' | ||
- $ref: './BrowseParams.yml#/cursor' | ||
|
||
BrowsePagination: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
page: | ||
$ref: '../../../common/schemas/SearchParams.yml#/page' | ||
nbHits: | ||
$ref: '../../../common/schemas/SearchResponse.yml#/nbHits' | ||
nbPages: | ||
$ref: '../../../common/schemas/SearchResponse.yml#/nbPages' | ||
hitsPerPage: | ||
$ref: '../../../common/schemas/IndexSettings.yml#/hitsPerPage' |
This file contains 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
Oops, something went wrong.