(cmd *cobra.Command)
| 685 | } |
| 686 | |
| 687 | func AddSearchParamsObjectFlags(cmd *cobra.Command) { |
| 688 | cmd.Flags().Bool("advancedSyntax", false, heredoc.Doc(`Whether to support phrase matching and excluding words from search queries. |
| 689 | See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntax`)) |
| 690 | cmd.Flags().SetAnnotation("advancedSyntax", "Categories", []string{"Query strategy"}) |
| 691 | cmd.Flags().StringSlice("advancedSyntaxFeatures", []string{"exactPhrase", "excludeWords"}, heredoc.Doc(`Advanced search syntax features you want to support. |
| 692 | See: https://www.algolia.com/doc/api-reference/api-parameters/advancedSyntaxFeatures`)) |
| 693 | cmd.Flags().SetAnnotation("advancedSyntaxFeatures", "Categories", []string{"Query strategy"}) |
| 694 | cmd.Flags().Bool("allowTyposOnNumericTokens", true, heredoc.Doc(`Whether to allow typos on numbers in the search query. |
| 695 | See: https://www.algolia.com/doc/api-reference/api-parameters/allowTyposOnNumericTokens`)) |
| 696 | cmd.Flags().SetAnnotation("allowTyposOnNumericTokens", "Categories", []string{"Typos"}) |
| 697 | cmd.Flags().StringSlice("alternativesAsExact", []string{"ignorePlurals", "singleWordSynonym"}, heredoc.Doc(`Determine which plurals and synonyms should be considered an exact matches. |
| 698 | See: https://www.algolia.com/doc/api-reference/api-parameters/alternativesAsExact`)) |
| 699 | cmd.Flags().SetAnnotation("alternativesAsExact", "Categories", []string{"Query strategy"}) |
| 700 | cmd.Flags().Bool("analytics", true, heredoc.Doc(`Whether this search will be included in Analytics. |
| 701 | See: https://www.algolia.com/doc/api-reference/api-parameters/analytics`)) |
| 702 | cmd.Flags().SetAnnotation("analytics", "Categories", []string{"Analytics"}) |
| 703 | cmd.Flags().StringSlice("analyticsTags", []string{}, heredoc.Doc(`Tags to apply to the query for segmenting analytics data. |
| 704 | See: https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags`)) |
| 705 | cmd.Flags().SetAnnotation("analyticsTags", "Categories", []string{"Analytics"}) |
| 706 | cmd.Flags().String("aroundLatLng", "", heredoc.Doc(`Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. |
| 707 | See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLng`)) |
| 708 | cmd.Flags().SetAnnotation("aroundLatLng", "Categories", []string{"Geo-Search"}) |
| 709 | cmd.Flags().Bool("aroundLatLngViaIP", false, heredoc.Doc(`Whether to obtain the coordinates from the request's IP address. |
| 710 | See: https://www.algolia.com/doc/api-reference/api-parameters/aroundLatLngViaIP`)) |
| 711 | cmd.Flags().SetAnnotation("aroundLatLngViaIP", "Categories", []string{"Geo-Search"}) |
| 712 | aroundPrecision := NewJSONVar([]string{"integer", "array"}...) |
| 713 | cmd.Flags().Var(aroundPrecision, "aroundPrecision", heredoc.Doc(`Precision of a coordinate-based search in meters to group results with similar distances. |
| 714 | See: https://www.algolia.com/doc/api-reference/api-parameters/aroundPrecision`)) |
| 715 | cmd.Flags().SetAnnotation("aroundPrecision", "Categories", []string{"Geo-Search"}) |
| 716 | aroundRadius := NewJSONVar([]string{"integer", "string"}...) |
| 717 | cmd.Flags().Var(aroundRadius, "aroundRadius", heredoc.Doc(`Maximum radius for a search around a central location. |
| 718 | See: https://www.algolia.com/doc/api-reference/api-parameters/aroundRadius`)) |
| 719 | cmd.Flags().SetAnnotation("aroundRadius", "Categories", []string{"Geo-Search"}) |
| 720 | cmd.Flags().Bool("attributeCriteriaComputedByMinProximity", false, heredoc.Doc(`Whether the best matching attribute should be determined by minimum proximity. |
| 721 | See: https://www.algolia.com/doc/api-reference/api-parameters/attributeCriteriaComputedByMinProximity`)) |
| 722 | cmd.Flags().SetAnnotation("attributeCriteriaComputedByMinProximity", "Categories", []string{"Advanced"}) |
| 723 | cmd.Flags().StringSlice("attributesToHighlight", []string{}, heredoc.Doc(`Attributes to highlight. |
| 724 | See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight`)) |
| 725 | cmd.Flags().SetAnnotation("attributesToHighlight", "Categories", []string{"Highlighting and Snippeting"}) |
| 726 | cmd.Flags().StringSlice("attributesToRetrieve", []string{"*"}, heredoc.Doc(`Attributes to include in the API response. |
| 727 | See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToRetrieve`)) |
| 728 | cmd.Flags().SetAnnotation("attributesToRetrieve", "Categories", []string{"Attributes"}) |
| 729 | cmd.Flags().StringSlice("attributesToSnippet", []string{}, heredoc.Doc(`Attributes for which to enable snippets. |
| 730 | See: https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet`)) |
| 731 | cmd.Flags().SetAnnotation("attributesToSnippet", "Categories", []string{"Highlighting and Snippeting"}) |
| 732 | cmd.Flags().Bool("clickAnalytics", false, heredoc.Doc(`Whether to include a queryID attribute in the response. |
| 733 | See: https://www.algolia.com/doc/api-reference/api-parameters/clickAnalytics`)) |
| 734 | cmd.Flags().SetAnnotation("clickAnalytics", "Categories", []string{"Analytics"}) |
| 735 | cmd.Flags().Bool("decompoundQuery", true, heredoc.Doc(`Whether to split compound words in the query into their building blocks. |
| 736 | See: https://www.algolia.com/doc/api-reference/api-parameters/decompoundQuery`)) |
| 737 | cmd.Flags().SetAnnotation("decompoundQuery", "Categories", []string{"Languages"}) |
| 738 | cmd.Flags().StringSlice("disableExactOnAttributes", []string{}, heredoc.Doc(`Searchable attributes for which you want to turn off the Exact ranking criterion. |
| 739 | See: https://www.algolia.com/doc/api-reference/api-parameters/disableExactOnAttributes`)) |
| 740 | cmd.Flags().SetAnnotation("disableExactOnAttributes", "Categories", []string{"Query strategy"}) |
| 741 | cmd.Flags().StringSlice("disableTypoToleranceOnAttributes", []string{}, heredoc.Doc(`Attributes for which you want to turn off typo tolerance. |
| 742 | See: https://www.algolia.com/doc/api-reference/api-parameters/disableTypoToleranceOnAttributes`)) |
| 743 | cmd.Flags().SetAnnotation("disableTypoToleranceOnAttributes", "Categories", []string{"Typos"}) |
| 744 | distinct := NewJSONVar([]string{"boolean", "integer"}...) |
no test coverage detected