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

Function AddIndexSettingsFlags

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

Source from the content-addressed store, hash-verified

495}
496
497func AddIndexSettingsFlags(cmd *cobra.Command) {
498 cmd.Flags().Bool("advancedSyntax", false, heredoc.Doc(`Whether to support phrase matching and excluding words from search queries.
499See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax`))
500 cmd.Flags().SetAnnotation("advancedSyntax", "Categories", []string{"Query strategy"})
501 cmd.Flags().StringSlice("advancedSyntaxFeatures", []string{"exactPhrase", "excludeWords"}, heredoc.Doc(`Advanced search syntax features you want to support.
502See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntaxFeatures`))
503 cmd.Flags().SetAnnotation("advancedSyntaxFeatures", "Categories", []string{"Query strategy"})
504 cmd.Flags().Bool("allowCompressionOfIntegerArray", false, heredoc.Doc(`Whether arrays with exclusively non-negative integers should be compressed for better performance.
505See: https://www.algolia.com/doc/api-reference/api-parameters/allowCompressionOfIntegerArray`))
506 cmd.Flags().SetAnnotation("allowCompressionOfIntegerArray", "Categories", []string{"Performance"})
507 cmd.Flags().Bool("allowTyposOnNumericTokens", true, heredoc.Doc(`Whether to allow typos on numbers in the search query.
508See: https://www.algolia.com/doc/api-reference/api-parameters/allowTyposOnNumericTokens`))
509 cmd.Flags().SetAnnotation("allowTyposOnNumericTokens", "Categories", []string{"Typos"})
510 cmd.Flags().StringSlice("alternativesAsExact", []string{"ignorePlurals", "singleWordSynonym"}, heredoc.Doc(`Determine which plurals and synonyms should be considered an exact matches.
511See: https://www.algolia.com/doc/api-reference/api-parameters/alternativesAsExact`))
512 cmd.Flags().SetAnnotation("alternativesAsExact", "Categories", []string{"Query strategy"})
513 cmd.Flags().Bool("attributeCriteriaComputedByMinProximity", false, heredoc.Doc(`Whether the best matching attribute should be determined by minimum proximity.
514See: https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity`))
515 cmd.Flags().SetAnnotation("attributeCriteriaComputedByMinProximity", "Categories", []string{"Advanced"})
516 cmd.Flags().String("attributeForDistinct", "", heredoc.Doc(`Attribute that should be used to establish groups of results.
517See: https://www.algolia.com/doc/api-reference/api-parameters/attributeForDistinct`))
518 cmd.Flags().StringSlice("attributesForFaceting", []string{}, heredoc.Doc(`Attributes used for faceting.
519See: https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting`))
520 cmd.Flags().SetAnnotation("attributesForFaceting", "Categories", []string{"Faceting"})
521 cmd.Flags().StringSlice("attributesToHighlight", []string{}, heredoc.Doc(`Attributes to highlight.
522See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight`))
523 cmd.Flags().SetAnnotation("attributesToHighlight", "Categories", []string{"Highlighting and Snippeting"})
524 cmd.Flags().StringSlice("attributesToRetrieve", []string{"*"}, heredoc.Doc(`Attributes to include in the API response.
525See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve`))
526 cmd.Flags().SetAnnotation("attributesToRetrieve", "Categories", []string{"Attributes"})
527 cmd.Flags().StringSlice("attributesToSnippet", []string{}, heredoc.Doc(`Attributes for which to enable snippets.
528See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet`))
529 cmd.Flags().SetAnnotation("attributesToSnippet", "Categories", []string{"Highlighting and Snippeting"})
530 cmd.Flags().StringSlice("attributesToTransliterate", []string{}, heredoc.Doc(`Attributes, for which you want to support Japanese transliteration.
531See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToTransliterate`))
532 cmd.Flags().SetAnnotation("attributesToTransliterate", "Categories", []string{"Languages"})
533 cmd.Flags().StringSlice("camelCaseAttributes", []string{}, heredoc.Doc(`Attributes for which to split camel case words.
534See: https://www.algolia.com/doc/api-reference/api-parameters/camelCaseAttributes`))
535 cmd.Flags().SetAnnotation("camelCaseAttributes", "Categories", []string{"Languages"})
536 customNormalization := NewJSONVar([]string{}...)
537 cmd.Flags().Var(customNormalization, "customNormalization", heredoc.Doc(`Characters and their normalized replacements.
538See: https://www.algolia.com/doc/api-reference/api-parameters/customNormalization`))
539 cmd.Flags().SetAnnotation("customNormalization", "Categories", []string{"Languages"})
540 cmd.Flags().StringSlice("customRanking", []string{}, heredoc.Doc(`Attributes to use as custom ranking.
541See: https://www.algolia.com/doc/api-reference/api-parameters/customRanking`))
542 cmd.Flags().SetAnnotation("customRanking", "Categories", []string{"Ranking"})
543 cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks.
544See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery`))
545 cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"})
546 decompoundedAttributes := NewJSONVar([]string{}...)
547 cmd.Flags().Var(decompoundedAttributes, "decompoundedAttributes", heredoc.Doc(`Searchable attributes to which Algolia should apply word segmentation (decompounding).
548See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundedAttributes`))
549 cmd.Flags().SetAnnotation("decompoundedAttributes", "Categories", []string{"Languages"})
550 cmd.Flags().StringSlice("disableExactOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off the Exact ranking criterion.
551See: https://www.algolia.com/doc/api-reference/api-parameters/disableExactOnAttributes`))
552 cmd.Flags().SetAnnotation("disableExactOnAttributes", "Categories", []string{"Query strategy"})
553 cmd.Flags().StringSlice("disablePrefixOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off prefix matching.
554See: https://www.algolia.com/doc/api-reference/api-parameters/disablePrefixOnAttributes`))

Callers 1

NewSetCmdFunction · 0.92

Calls 2

NewJSONVarFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected