MCPcopy Create free account
hub / github.com/algolia/cli / AddBrowseParamsObjectFlags

Function AddBrowseParamsObjectFlags

pkg/cmdutil/spec_flags.go:238–466  ·  view source on GitHub ↗
(cmd *cobra.Command)

Source from the content-addressed store, hash-verified

236}
237
238func AddBrowseParamsObjectFlags(cmd *cobra.Command) {
239 cmd.Flags().Bool("advancedSyntax", false, heredoc.Doc(`Whether to support phrase matching and excluding words from search queries.
240See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax`))
241 cmd.Flags().SetAnnotation("advancedSyntax", "Categories", []string{"Query strategy"})
242 cmd.Flags().StringSlice("advancedSyntaxFeatures", []string{"exactPhrase", "excludeWords"}, heredoc.Doc(`Advanced search syntax features you want to support.
243See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntaxFeatures`))
244 cmd.Flags().SetAnnotation("advancedSyntaxFeatures", "Categories", []string{"Query strategy"})
245 cmd.Flags().Bool("allowTyposOnNumericTokens", true, heredoc.Doc(`Whether to allow typos on numbers in the search query.
246See: https://www.algolia.com/doc/api-reference/api-parameters/allowTyposOnNumericTokens`))
247 cmd.Flags().SetAnnotation("allowTyposOnNumericTokens", "Categories", []string{"Typos"})
248 cmd.Flags().StringSlice("alternativesAsExact", []string{"ignorePlurals", "singleWordSynonym"}, heredoc.Doc(`Determine which plurals and synonyms should be considered an exact matches.
249See: https://www.algolia.com/doc/api-reference/api-parameters/alternativesAsExact`))
250 cmd.Flags().SetAnnotation("alternativesAsExact", "Categories", []string{"Query strategy"})
251 cmd.Flags().Bool("analytics", true, heredoc.Doc(`Whether this search will be included in Analytics.
252See: https://www.algolia.com/doc/api-reference/api-parameters/analytics`))
253 cmd.Flags().SetAnnotation("analytics", "Categories", []string{"Analytics"})
254 cmd.Flags().StringSlice("analyticsTags", []string{}, heredoc.Doc(`Tags to apply to the query for segmenting analytics data.
255See: https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags`))
256 cmd.Flags().SetAnnotation("analyticsTags", "Categories", []string{"Analytics"})
257 cmd.Flags().String("aroundLatLng", "", heredoc.Doc(`Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude.
258See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLng`))
259 cmd.Flags().SetAnnotation("aroundLatLng", "Categories", []string{"Geo-Search"})
260 cmd.Flags().Bool("aroundLatLngViaIP", false, heredoc.Doc(`Whether to obtain the coordinates from the request's IP address.
261See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLngViaIP`))
262 cmd.Flags().SetAnnotation("aroundLatLngViaIP", "Categories", []string{"Geo-Search"})
263 aroundPrecision := NewJSONVar([]string{"integer", "array"}...)
264 cmd.Flags().Var(aroundPrecision, "aroundPrecision", heredoc.Doc(`Precision of a coordinate-based search in meters to group results with similar distances.
265See: https://www.algolia.com/doc/api-reference/api-parameters/aroundPrecision`))
266 cmd.Flags().SetAnnotation("aroundPrecision", "Categories", []string{"Geo-Search"})
267 aroundRadius := NewJSONVar([]string{"integer", "string"}...)
268 cmd.Flags().Var(aroundRadius, "aroundRadius", heredoc.Doc(`Maximum radius for a search around a central location.
269See: https://www.algolia.com/doc/api-reference/api-parameters/aroundRadius`))
270 cmd.Flags().SetAnnotation("aroundRadius", "Categories", []string{"Geo-Search"})
271 cmd.Flags().Bool("attributeCriteriaComputedByMinProximity", false, heredoc.Doc(`Whether the best matching attribute should be determined by minimum proximity.
272See: https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity`))
273 cmd.Flags().SetAnnotation("attributeCriteriaComputedByMinProximity", "Categories", []string{"Advanced"})
274 cmd.Flags().StringSlice("attributesToHighlight", []string{}, heredoc.Doc(`Attributes to highlight.
275See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight`))
276 cmd.Flags().SetAnnotation("attributesToHighlight", "Categories", []string{"Highlighting and Snippeting"})
277 cmd.Flags().StringSlice("attributesToRetrieve", []string{"*"}, heredoc.Doc(`Attributes to include in the API response.
278See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve`))
279 cmd.Flags().SetAnnotation("attributesToRetrieve", "Categories", []string{"Attributes"})
280 cmd.Flags().StringSlice("attributesToSnippet", []string{}, heredoc.Doc(`Attributes for which to enable snippets.
281See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet`))
282 cmd.Flags().SetAnnotation("attributesToSnippet", "Categories", []string{"Highlighting and Snippeting"})
283 cmd.Flags().Bool("clickAnalytics", false, heredoc.Doc(`Whether to include a queryID attribute in the response.
284See: https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics`))
285 cmd.Flags().SetAnnotation("clickAnalytics", "Categories", []string{"Analytics"})
286 cmd.Flags().String("cursor", "", heredoc.Doc(`Cursor to get the next page of the response.`))
287 cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks.
288See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery`))
289 cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"})
290 cmd.Flags().StringSlice("disableExactOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off the Exact ranking criterion.
291See: https://www.algolia.com/doc/api-reference/api-parameters/disableExactOnAttributes`))
292 cmd.Flags().SetAnnotation("disableExactOnAttributes", "Categories", []string{"Query strategy"})
293 cmd.Flags().StringSlice("disableTypoToleranceOnAttributes", []string{}, heredoc.Doc(`Attributes for which you want to turn off typo tolerance.
294See: https://www.algolia.com/doc/api-reference/api-parameters/disableTypoToleranceOnAttributes`))
295 cmd.Flags().SetAnnotation("disableTypoToleranceOnAttributes", "Categories", []string{"Typos"})

Callers 1

NewAnalyzeCmdFunction · 0.92

Calls 2

NewJSONVarFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected