Skip to content

Commit 3b67624

Browse files
committed
fix: actually follow spec
1 parent 17c1696 commit 3b67624

File tree

1 file changed

+3
-147
lines changed

1 file changed

+3
-147
lines changed

specs/composition/common/schemas/SearchResponse.yml

Lines changed: 3 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ searchResults:
1616

1717
searchResultsItem:
1818
allOf:
19-
- $ref: '#/resultsCompositionsResponse'
20-
- $ref: '#/searchHits'
19+
- $ref: '../../../common/schemas/SearchResponse.yml#/baseSearchResponse'
2120
- $ref: '../../../common/schemas/SearchResponse.yml#/SearchPagination'
21+
- $ref: '#/searchHits'
22+
- $ref: '#/resultsCompositionsResponse'
2223

2324
searchHits:
2425
type: object
@@ -83,151 +84,6 @@ compositionBaseSearchResponse:
8384
properties:
8485
compositions:
8586
$ref: '#/compositionsSearchResponse'
86-
abTestID:
87-
type: integer
88-
description: A/B test ID. This is only included in the response for indices that are part of an A/B test.
89-
abTestVariantID:
90-
type: integer
91-
minimum: 1
92-
description: Variant ID. This is only included in the response for indices that are part of an A/B test.
93-
aroundLatLng:
94-
type: string
95-
description: Computed geographical location.
96-
example: '40.71,-74.01'
97-
pattern: ^(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)$
98-
automaticRadius:
99-
type: string
100-
description: Distance from a central coordinate provided by `aroundLatLng`.
101-
exhaustive:
102-
title: exhaustive
103-
type: object
104-
description: Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
105-
properties:
106-
facetsCount:
107-
type: boolean
108-
title: facetsCount
109-
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-).
110-
facetValues:
111-
type: boolean
112-
title: facetValues
113-
description: The value is `false` if not all facet values are retrieved.
114-
nbHits:
115-
type: boolean
116-
title: nbHits
117-
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.
118-
rulesMatch:
119-
type: boolean
120-
title: rulesMatch
121-
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.
122-
typo:
123-
type: boolean
124-
title: typo
125-
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.
126-
exhaustiveFacetsCount:
127-
type: boolean
128-
description: See the `facetsCount` field of the `exhaustive` object in the response.
129-
deprecated: true
130-
exhaustiveNbHits:
131-
type: boolean
132-
description: See the `nbHits` field of the `exhaustive` object in the response.
133-
deprecated: true
134-
exhaustiveTypo:
135-
type: boolean
136-
description: See the `typo` field of the `exhaustive` object in the response.
137-
deprecated: true
138-
facets:
139-
title: facets
140-
type: object
141-
additionalProperties:
142-
x-additionalPropertiesName: facet
143-
type: object
144-
additionalProperties:
145-
x-additionalPropertiesName: facet count
146-
type: integer
147-
description: Facet counts.
148-
example:
149-
category:
150-
food: 1
151-
tech: 42
152-
facets_stats:
153-
type: object
154-
description: Statistics for numerical facets.
155-
additionalProperties:
156-
title: facetStats
157-
type: object
158-
properties:
159-
min:
160-
type: number
161-
format: double
162-
description: Minimum value in the results.
163-
max:
164-
type: number
165-
format: double
166-
description: Maximum value in the results.
167-
avg:
168-
type: number
169-
format: double
170-
description: Average facet value in the results.
171-
sum:
172-
type: number
173-
format: double
174-
description: Sum of all values in the results.
175-
index:
176-
type: string
177-
example: indexName
178-
description: Index name used for the query.
179-
indexUsed:
180-
type: string
181-
description: Index name used for the query. During A/B testing, the targeted index isn't always the index used by the query.
182-
example: indexNameAlt
183-
message:
184-
type: string
185-
description: Warnings about the query.
186-
nbSortedHits:
187-
type: integer
188-
description: Number of hits selected and sorted by the relevant sort algorithm.
189-
example: 20
190-
parsedQuery:
191-
type: string
192-
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.
193-
example: 'george clo'
194-
processingTimeMS:
195-
$ref: '../../../common/schemas/SearchResponse.yml#/processingTimeMS'
196-
processingTimingsMS:
197-
type: object
198-
description: Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
199-
queryAfterRemoval:
200-
type: string
201-
description: Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
202-
redirect:
203-
title: redirect
204-
type: object
205-
description: |
206-
[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.
207-
properties:
208-
index:
209-
type: array
210-
items:
211-
$ref: '../../../common/schemas/SearchResponse.yml#/RedirectRuleIndexMetadata'
212-
renderingContent:
213-
$ref: '../../../common/schemas//IndexSettings.yml#/renderingContent'
214-
serverTimeMS:
215-
type: integer
216-
description: Time the server took to process the request, in milliseconds.
217-
example: 20
218-
serverUsed:
219-
type: string
220-
description: Host name of the server that processed the request.
221-
example: 'c2-uk-3.algolia.net'
222-
userData:
223-
$ref: '../../../common/schemas//IndexSettings.yml#/userData'
224-
queryID:
225-
type: string
226-
description: Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
227-
example: 'a00dbc80a8d13c4565a442e7e2dca80a'
228-
_automaticInsights:
229-
type: boolean
230-
description: Whether automatic events collection is enabled for the application.
23187

23288
compositionsSearchResponse:
23389
type: object

0 commit comments

Comments
 (0)