Skip to content

Commit

Permalink
chore: update search api specs (#157)
Browse files Browse the repository at this point in the history
Co-authored-by: algolia-ci <noreply@algolia.com>
  • Loading branch information
clemfromspace and algolia-ci authored May 28, 2024
1 parent 3529a4c commit b33c7b0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 33 deletions.
56 changes: 29 additions & 27 deletions api/specs/search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3423,20 +3423,6 @@ components:
example: (category:Book OR category:Ebook) AND _tags:published
x-categories:
- Filtering
searchFiltersArrayString:
title: search filter array
type: array
items:
type: string
mixedSearchFilters:
oneOf:
- $ref: '#/components/schemas/searchFiltersArrayString'
- type: string
listOfSearchFilters:
type: array
title: search filters
items:
$ref: '#/components/schemas/mixedSearchFilters'
facetFilters:
description: >
Filter the search by facet values, so that only records with the same
Expand Down Expand Up @@ -3465,7 +3451,9 @@ components:
- category:-Movie
- author:John Doe
oneOf:
- $ref: '#/components/schemas/listOfSearchFilters'
- type: array
items:
$ref: '#/components/schemas/facetFilters'
- type: string
x-categories:
- Filtering
Expand Down Expand Up @@ -3493,7 +3481,9 @@ components:
- category:Book
- author:John Doe
oneOf:
- $ref: '#/components/schemas/listOfSearchFilters'
- type: array
items:
$ref: '#/components/schemas/optionalFilters'
- type: string
x-categories:
- Filtering
Expand All @@ -3519,7 +3509,9 @@ components:
- deliveryDate < 1441755506
- price < 1000
oneOf:
- $ref: '#/components/schemas/listOfSearchFilters'
- type: array
items:
$ref: '#/components/schemas/numericFilters'
- type: string
x-categories:
- Filtering
Expand All @@ -3544,7 +3536,9 @@ components:
- Movie
- SciFi
oneOf:
- $ref: '#/components/schemas/listOfSearchFilters'
- type: array
items:
$ref: '#/components/schemas/tagFilters'
- type: string
x-categories:
- Filtering
Expand Down Expand Up @@ -4423,11 +4417,12 @@ components:
Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/)
to records that match these filters.
oneOf:
- $ref: '#/components/schemas/listOfSearchFilters'
- type: array
items:
$ref: '#/components/schemas/reRankingApplyFilter'
- type: string
x-categories:
- Filtering
- type: 'null'
indexSettingsAsSearchParams:
type: object
additionalProperties: false
Expand Down Expand Up @@ -5075,7 +5070,9 @@ components:
x-categories:
- Filtering
reRankingApplyFilter:
$ref: '#/components/schemas/reRankingApplyFilter'
oneOf:
- $ref: '#/components/schemas/reRankingApplyFilter'
- type: 'null'
searchParamsObject:
title: Search parameters as object
description: >-
Expand All @@ -5088,10 +5085,6 @@ components:
oneOf:
- $ref: '#/components/schemas/searchParamsString'
- $ref: '#/components/schemas/searchParamsObject'
exhaustiveFacetsCount:
type: boolean
description: See the `facetsCount` field of the `exhaustive` object in the response.
deprecated: true
nbHits:
type: integer
description: Number of results (hits).
Expand Down Expand Up @@ -5223,7 +5216,11 @@ components:
alternatives exist for the query). This field will not be
included when typo-tolerance is entirely disabled.
exhaustiveFacetsCount:
$ref: '#/components/schemas/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.
Expand Down Expand Up @@ -5705,7 +5702,12 @@ components:
approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
type: integer
exhaustiveFacetsCount:
$ref: '#/components/schemas/exhaustiveFacetsCount'
type: boolean
description: >
Whether the facet count is exhaustive (true) or approximate (false).
For more information, see [Why are my facet and hit counts not
accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
processingTimeMS:
$ref: '#/components/schemas/processingTimeMS'
searchResult:
Expand Down
12 changes: 6 additions & 6 deletions pkg/cmdutil/spec_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,8 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/queryType/`))
cmd.Flags().StringSlice("ranking", []string{"typo", "geo", "words", "filters", "proximity", "attribute", "exact", "custom"}, heredoc.Doc(`Determines the order in which Algolia returns your results.
See: https://www.algolia.com/doc/api-reference/api-parameters/ranking/`))
cmd.Flags().SetAnnotation("ranking", "Categories", []string{"Ranking"})
reRankingApplyFilter := NewJSONVar([]string{"array", "string", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`Restrict Dynamic Re-Ranking to records that match these filters.`))
reRankingApplyFilter := NewJSONVar([]string{"", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`.`))
cmd.Flags().Int("relevancyStrictness", 100, heredoc.Doc(`Relevancy threshold below which less relevant results aren't included in the results.
See: https://www.algolia.com/doc/api-reference/api-parameters/relevancyStrictness/`))
cmd.Flags().SetAnnotation("relevancyStrictness", "Categories", []string{"Ranking"})
Expand Down Expand Up @@ -640,8 +640,8 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/queryType/`))
cmd.Flags().StringSlice("ranking", []string{"typo", "geo", "words", "filters", "proximity", "attribute", "exact", "custom"}, heredoc.Doc(`Determines the order in which Algolia returns your results.
See: https://www.algolia.com/doc/api-reference/api-parameters/ranking/`))
cmd.Flags().SetAnnotation("ranking", "Categories", []string{"Ranking"})
reRankingApplyFilter := NewJSONVar([]string{"array", "string", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`Restrict Dynamic Re-Ranking to records that match these filters.`))
reRankingApplyFilter := NewJSONVar([]string{"", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`.`))
cmd.Flags().Int("relevancyStrictness", 100, heredoc.Doc(`Relevancy threshold below which less relevant results aren't included in the results.
See: https://www.algolia.com/doc/api-reference/api-parameters/relevancyStrictness/`))
cmd.Flags().SetAnnotation("relevancyStrictness", "Categories", []string{"Ranking"})
Expand Down Expand Up @@ -870,8 +870,8 @@ See: https://www.algolia.com/doc/api-reference/api-parameters/queryType/`))
cmd.Flags().StringSlice("ranking", []string{"typo", "geo", "words", "filters", "proximity", "attribute", "exact", "custom"}, heredoc.Doc(`Determines the order in which Algolia returns your results.
See: https://www.algolia.com/doc/api-reference/api-parameters/ranking/`))
cmd.Flags().SetAnnotation("ranking", "Categories", []string{"Ranking"})
reRankingApplyFilter := NewJSONVar([]string{"array", "string", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`Restrict Dynamic Re-Ranking to records that match these filters.`))
reRankingApplyFilter := NewJSONVar([]string{"", "null"}...)
cmd.Flags().Var(reRankingApplyFilter, "reRankingApplyFilter", heredoc.Doc(`.`))
cmd.Flags().Int("relevancyStrictness", 100, heredoc.Doc(`Relevancy threshold below which less relevant results aren't included in the results.
See: https://www.algolia.com/doc/api-reference/api-parameters/relevancyStrictness/`))
cmd.Flags().SetAnnotation("relevancyStrictness", "Categories", []string{"Ranking"})
Expand Down

0 comments on commit b33c7b0

Please sign in to comment.